aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-05-04 15:18:53 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-04 15:18:53 -0400
commitb1983cd897ec06080ec4884989c6a3f1e7ee7dce (patch)
tree2bb86026350b0b7e511cf6578d37c9e43efd59ee /fs/namespace.c
parent61572bb1f40b9bec0acbb4d7bc0f5b33739f1ab1 (diff)
create_mnt_ns: unidiomatic use of list_add()
while list_add(A, B) and list_add(B, A) are equivalent when both A and B are guaranteed to be empty, the usual idiom is list_add(what, where), not the other way round... Not a bug per se, but only by accident and it makes RTFS harder for no good reason. Spotted-by: Rajat Sharma <fs.rajat@gmail.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index b68eef2d592a..7b1ca9ba0b0a 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -2463,7 +2463,7 @@ static struct mnt_namespace *create_mnt_ns(struct vfsmount *m)
2463 struct mount *mnt = real_mount(m); 2463 struct mount *mnt = real_mount(m);
2464 mnt->mnt_ns = new_ns; 2464 mnt->mnt_ns = new_ns;
2465 new_ns->root = mnt; 2465 new_ns->root = mnt;
2466 list_add(&new_ns->list, &mnt->mnt_list); 2466 list_add(&mnt->mnt_list, &new_ns->list);
2467 } else { 2467 } else {
2468 mntput(m); 2468 mntput(m);
2469 } 2469 }