aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-03-11 12:10:50 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-04 15:43:02 -0400
commit9ed53b12a9a60f4d52228335e76cbbdf0c7e37fb (patch)
treef8c83534f8241b09db9cc95245f594c123b11c70 /fs
parent75fc0cf6af45e5de251caa9421b3c3d1bdc273c8 (diff)
vfs: use list_move instead of list_del/list_add
Using list_move() instead of list_del() + list_add(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/dcache.c3
1 files changed, 1 insertions, 2 deletions
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)
2397 dentry->d_parent = dentry; 2397 dentry->d_parent = dentry;
2398 list_del_init(&dentry->d_u.d_child); 2398 list_del_init(&dentry->d_u.d_child);
2399 anon->d_parent = dparent; 2399 anon->d_parent = dparent;
2400 list_del(&anon->d_u.d_child); 2400 list_move(&anon->d_u.d_child, &dparent->d_subdirs);
2401 list_add(&anon->d_u.d_child, &dparent->d_subdirs);
2402 2401
2403 write_seqcount_end(&dentry->d_seq); 2402 write_seqcount_end(&dentry->d_seq);
2404 write_seqcount_end(&anon->d_seq); 2403 write_seqcount_end(&anon->d_seq);