Skip to content

Commit 0385492

Browse files
Dr. David Alan Gilbertidryomov
authored andcommitted
libceph: Remove unused ceph_pagelist functions
ceph_pagelist_truncate() and ceph_pagelist_set_cursor() have been unused since commit 39be95e ("ceph: ceph_pagelist_append might sleep while atomic") Remove them. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Reviewed-by: Ilya Dryomov <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent adc2186 commit 0385492

File tree

2 files changed

+0
-50
lines changed

2 files changed

+0
-50
lines changed

include/linux/ceph/pagelist.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,6 @@ struct ceph_pagelist {
1717
refcount_t refcnt;
1818
};
1919

20-
struct ceph_pagelist_cursor {
21-
struct ceph_pagelist *pl; /* pagelist, for error checking */
22-
struct list_head *page_lru; /* page in list */
23-
size_t room; /* room remaining to reset to */
24-
};
25-
2620
struct ceph_pagelist *ceph_pagelist_alloc(gfp_t gfp_flags);
2721

2822
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);
3327

3428
extern int ceph_pagelist_free_reserve(struct ceph_pagelist *pl);
3529

36-
extern void ceph_pagelist_set_cursor(struct ceph_pagelist *pl,
37-
struct ceph_pagelist_cursor *c);
38-
39-
extern int ceph_pagelist_truncate(struct ceph_pagelist *pl,
40-
struct ceph_pagelist_cursor *c);
41-
4230
static inline int ceph_pagelist_encode_64(struct ceph_pagelist *pl, u64 v)
4331
{
4432
__le64 ev = cpu_to_le64(v);

net/ceph/pagelist.c

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -131,41 +131,3 @@ int ceph_pagelist_free_reserve(struct ceph_pagelist *pl)
131131
return 0;
132132
}
133133
EXPORT_SYMBOL(ceph_pagelist_free_reserve);
134-
135-
/* Create a truncation point. */
136-
void ceph_pagelist_set_cursor(struct ceph_pagelist *pl,
137-
struct ceph_pagelist_cursor *c)
138-
{
139-
c->pl = pl;
140-
c->page_lru = pl->head.prev;
141-
c->room = pl->room;
142-
}
143-
EXPORT_SYMBOL(ceph_pagelist_set_cursor);
144-
145-
/* Truncate a pagelist to the given point. Move extra pages to reserve.
146-
* This won't sleep.
147-
* Returns: 0 on success,
148-
* -EINVAL if the pagelist doesn't match the trunc point pagelist
149-
*/
150-
int ceph_pagelist_truncate(struct ceph_pagelist *pl,
151-
struct ceph_pagelist_cursor *c)
152-
{
153-
struct page *page;
154-
155-
if (pl != c->pl)
156-
return -EINVAL;
157-
ceph_pagelist_unmap_tail(pl);
158-
while (pl->head.prev != c->page_lru) {
159-
page = list_entry(pl->head.prev, struct page, lru);
160-
/* move from pagelist to reserve */
161-
list_move_tail(&page->lru, &pl->free_list);
162-
++pl->num_pages_free;
163-
}
164-
pl->room = c->room;
165-
if (!list_empty(&pl->head)) {
166-
page = list_entry(pl->head.prev, struct page, lru);
167-
pl->mapped_tail = kmap(page);
168-
}
169-
return 0;
170-
}
171-
EXPORT_SYMBOL(ceph_pagelist_truncate);

0 commit comments

Comments
 (0)