summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIlya Dryomov <idryomov@gmail.com>2018-09-28 16:38:34 +0300
committerIlya Dryomov <idryomov@gmail.com>2018-10-22 11:28:21 +0300
commit33165d472310262d8c79c7e4d1a17dc60cea7e35 (patch)
treebf498d59251d10a2f8c603ef28200d7d42d6bee4 /include
parent24639ce56040a8ea890ad8836068c1ad8bd177c7 (diff)
downloadlinux-33165d472310262d8c79c7e4d1a17dc60cea7e35.tar.xz
libceph: introduce ceph_pagelist_alloc()
struct ceph_pagelist cannot be embedded into anything else because it has its own refcount. Merge allocation and initialization together. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ceph/pagelist.h11
1 files changed, 1 insertions, 10 deletions
diff --git a/include/linux/ceph/pagelist.h b/include/linux/ceph/pagelist.h
index d0223364349f..5dead8486fd8 100644
--- a/include/linux/ceph/pagelist.h
+++ b/include/linux/ceph/pagelist.h
@@ -23,16 +23,7 @@ struct ceph_pagelist_cursor {
size_t room; /* room remaining to reset to */
};
-static inline void ceph_pagelist_init(struct ceph_pagelist *pl)
-{
- INIT_LIST_HEAD(&pl->head);
- pl->mapped_tail = NULL;
- pl->length = 0;
- pl->room = 0;
- INIT_LIST_HEAD(&pl->free_list);
- pl->num_pages_free = 0;
- refcount_set(&pl->refcnt, 1);
-}
+struct ceph_pagelist *ceph_pagelist_alloc(gfp_t gfp_flags);
extern void ceph_pagelist_release(struct ceph_pagelist *pl);