From: Wei Yongjun Date: Mon, 11 Mar 2013 16:10:50 +0000 (+0800) Subject: vfs: use list_move instead of list_del/list_add X-Git-Tag: firefly_0821_release~3680^2~580^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9ed53b12a9a60f4d52228335e76cbbdf0c7e37fb;p=firefly-linux-kernel-4.4.55.git vfs: use list_move instead of list_del/list_add Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun Signed-off-by: Al Viro --- diff --git a/fs/dcache.c b/fs/dcache.c index a161ebcab9d2..f09b9085f7d8 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -2397,8 +2397,7 @@ static void __d_materialise_dentry(struct dentry *dentry, struct dentry *anon) dentry->d_parent = dentry; list_del_init(&dentry->d_u.d_child); anon->d_parent = dparent; - list_del(&anon->d_u.d_child); - list_add(&anon->d_u.d_child, &dparent->d_subdirs); + list_move(&anon->d_u.d_child, &dparent->d_subdirs); write_seqcount_end(&dentry->d_seq); write_seqcount_end(&anon->d_seq);