diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-09-05 08:34:32 +0200 |
---|---|---|
committer | Alex Elder <elder@inktank.com> | 2012-10-01 21:30:49 +0200 |
commit | cc4829e5967de577794b25dfcd1a65e509d171ed (patch) | |
tree | 99e14d39ac747a678df303caee99c41ce48ebd9f /net | |
parent | rbd: add new snapshots at the tail (diff) | |
download | linux-cc4829e5967de577794b25dfcd1a65e509d171ed.tar.xz linux-cc4829e5967de577794b25dfcd1a65e509d171ed.zip |
ceph: use list_move_tail instead of list_del/list_add_tail
Using list_move_tail() instead of list_del() + list_add_tail().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/pagelist.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ceph/pagelist.c b/net/ceph/pagelist.c index 665cd23020ff..92866bebb65f 100644 --- a/net/ceph/pagelist.c +++ b/net/ceph/pagelist.c @@ -1,4 +1,3 @@ - #include <linux/module.h> #include <linux/gfp.h> #include <linux/pagemap.h> @@ -134,8 +133,8 @@ int ceph_pagelist_truncate(struct ceph_pagelist *pl, ceph_pagelist_unmap_tail(pl); while (pl->head.prev != c->page_lru) { page = list_entry(pl->head.prev, struct page, lru); - list_del(&page->lru); /* remove from pagelist */ - list_add_tail(&page->lru, &pl->free_list); /* add to reserve */ + /* move from pagelist to reserve */ + list_move_tail(&page->lru, &pl->free_list); ++pl->num_pages_free; } pl->room = c->room; |