Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ed53b12 authored by Wei Yongjun's avatar Wei Yongjun Committed by Al Viro
Browse files

vfs: use list_move instead of list_del/list_add



Using list_move() instead of list_del() + list_add().

Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 75fc0cf6
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -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);