]> www.infradead.org Git - users/hch/misc.git/commitdiff
libceph: Remove unused ceph_pagelist functions
authorDr. David Alan Gilbert <linux@treblig.org>
Sun, 6 Oct 2024 01:19:52 +0000 (02:19 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 18 Nov 2024 16:34:35 +0000 (17:34 +0100)
ceph_pagelist_truncate() and ceph_pagelist_set_cursor() have been unused
since commit
39be95e9c8c0 ("ceph: ceph_pagelist_append might sleep while atomic")

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
include/linux/ceph/pagelist.h
net/ceph/pagelist.c

index 5dead8486fd8f38e9ac2c9333374b6da2b1d21f7..879bec0863aa16e884b20df21273f4efdf637a65 100644 (file)
@@ -17,12 +17,6 @@ struct ceph_pagelist {
        refcount_t refcnt;
 };
 
-struct ceph_pagelist_cursor {
-       struct ceph_pagelist *pl;   /* pagelist, for error checking */
-       struct list_head *page_lru; /* page in list */
-       size_t room;                /* room remaining to reset to */
-};
-
 struct ceph_pagelist *ceph_pagelist_alloc(gfp_t gfp_flags);
 
 extern void ceph_pagelist_release(struct ceph_pagelist *pl);
@@ -33,12 +27,6 @@ extern int ceph_pagelist_reserve(struct ceph_pagelist *pl, size_t space);
 
 extern int ceph_pagelist_free_reserve(struct ceph_pagelist *pl);
 
-extern void ceph_pagelist_set_cursor(struct ceph_pagelist *pl,
-                                    struct ceph_pagelist_cursor *c);
-
-extern int ceph_pagelist_truncate(struct ceph_pagelist *pl,
-                                 struct ceph_pagelist_cursor *c);
-
 static inline int ceph_pagelist_encode_64(struct ceph_pagelist *pl, u64 v)
 {
        __le64 ev = cpu_to_le64(v);
index 74622b278d5766bd57803d9e160ac9c390b9b287..5a9c4be5f222106c8b372affd115b8f899a920a9 100644 (file)
@@ -131,41 +131,3 @@ int ceph_pagelist_free_reserve(struct ceph_pagelist *pl)
        return 0;
 }
 EXPORT_SYMBOL(ceph_pagelist_free_reserve);
-
-/* Create a truncation point. */
-void ceph_pagelist_set_cursor(struct ceph_pagelist *pl,
-                             struct ceph_pagelist_cursor *c)
-{
-       c->pl = pl;
-       c->page_lru = pl->head.prev;
-       c->room = pl->room;
-}
-EXPORT_SYMBOL(ceph_pagelist_set_cursor);
-
-/* Truncate a pagelist to the given point. Move extra pages to reserve.
- * This won't sleep.
- * Returns: 0 on success,
- *          -EINVAL if the pagelist doesn't match the trunc point pagelist
- */
-int ceph_pagelist_truncate(struct ceph_pagelist *pl,
-                          struct ceph_pagelist_cursor *c)
-{
-       struct page *page;
-
-       if (pl != c->pl)
-               return -EINVAL;
-       ceph_pagelist_unmap_tail(pl);
-       while (pl->head.prev != c->page_lru) {
-               page = list_entry(pl->head.prev, struct page, lru);
-               /* move from pagelist to reserve */
-               list_move_tail(&page->lru, &pl->free_list);
-               ++pl->num_pages_free;
-       }
-       pl->room = c->room;
-       if (!list_empty(&pl->head)) {
-               page = list_entry(pl->head.prev, struct page, lru);
-               pl->mapped_tail = kmap(page);
-       }
-       return 0;
-}
-EXPORT_SYMBOL(ceph_pagelist_truncate);