struct page {
void * addr;
- cfs_atomic_t count;
+ atomic_t count;
void * private;
void * mapping;
__u32 index;
static inline void get_page(struct page *page)
{
- cfs_atomic_inc(&page->count);
+ atomic_inc(&page->count);
}
static inline void cfs_put_page(struct page *page)
{
- cfs_atomic_dec(&page->count);
+ atomic_dec(&page->count);
}
static inline int page_count(struct page *page)
{
- return cfs_atomic_read(&page->count);
+ return atomic_read(&page->count);
}
#define page_index(p) ((p)->index)
extern void kmem_cache_free(struct kmem_cache *, void *);
/*
- * shrinker
+ * shrinker
*/
typedef int (*shrink_callback)(int nr_to_scan, gfp_t gfp_mask);
struct shrinker {
- shrink_callback cb;
+ shrink_callback cb;
int seeks; /* seeks to recreate an obj */
/* These are for internal use */
- cfs_list_t list;
+ struct list_head list;
long nr; /* objs pending delete */
};
void stop_shrinker_timer();
/*
- * Page allocator slabs
+ * Page allocator slabs
*/
extern struct kmem_cache *cfs_page_t_slab;