summaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorWei Yongjun <weiyj.lk@gmail.com>2016-08-13 12:10:28 +0300
committerIlya Dryomov <idryomov@gmail.com>2016-10-03 17:13:50 +0300
commit8cdcc07dde27d29bc25b3588238d4b1cc9a56fe9 (patch)
tree85304cebcfdf25e0e15eaa85f496551066d1f17e /fs/ceph
parentfcff415c9421b417ef91d48f546f3c4566ddc358 (diff)
downloadlinux-8cdcc07dde27d29bc25b3588238d4b1cc9a56fe9.tar.xz
ceph: use list_move instead of list_del/list_add
Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/mds_client.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 277ac9c5c99c..815acd1a56d4 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -1151,8 +1151,7 @@ static int remove_session_caps_cb(struct inode *inode, struct ceph_cap *cap,
while (!list_empty(&ci->i_cap_flush_list)) {
cf = list_first_entry(&ci->i_cap_flush_list,
struct ceph_cap_flush, i_list);
- list_del(&cf->i_list);
- list_add(&cf->i_list, &to_remove);
+ list_move(&cf->i_list, &to_remove);
}
spin_lock(&mdsc->cap_dirty_lock);