Commit 8cdcc07d authored by Wei Yongjun's avatar Wei Yongjun Committed by Ilya Dryomov

ceph: use list_move instead of list_del/list_add

Using list_move() instead of list_del() + list_add().
Signed-off-by: default avatarWei Yongjun <weiyj.lk@gmail.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent fcff415c
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment