Skip to content

Commit

Permalink
vfs: use list_move instead of list_del/list_add
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Al Viro committed May 4, 2013
1 parent 75fc0cf commit 9ed53b1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9ed53b1

Please sign in to comment.