|
|
@@ -2,7 +2,7 @@
|
|
|
#define __FS_CEPH_PAGELIST_H
|
|
|
|
|
|
#include <asm/byteorder.h>
|
|
|
-#include <linux/atomic.h>
|
|
|
+#include <linux/refcount.h>
|
|
|
#include <linux/list.h>
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
@@ -13,7 +13,7 @@ struct ceph_pagelist {
|
|
|
size_t room;
|
|
|
struct list_head free_list;
|
|
|
size_t num_pages_free;
|
|
|
- atomic_t refcnt;
|
|
|
+ refcount_t refcnt;
|
|
|
};
|
|
|
|
|
|
struct ceph_pagelist_cursor {
|
|
|
@@ -30,7 +30,7 @@ static inline void ceph_pagelist_init(struct ceph_pagelist *pl)
|
|
|
pl->room = 0;
|
|
|
INIT_LIST_HEAD(&pl->free_list);
|
|
|
pl->num_pages_free = 0;
|
|
|
- atomic_set(&pl->refcnt, 1);
|
|
|
+ refcount_set(&pl->refcnt, 1);
|
|
|
}
|
|
|
|
|
|
extern void ceph_pagelist_release(struct ceph_pagelist *pl);
|