Commit
b1983cd897ec06080ec4884989c6a3f1e7ee7dce
Exists in
master
and in
20 other branches
dlt-processor-sdk-linux-03.00.00.04, newt-ti-linux-3.12.y, processor-sdk-linux-01.00.00, processor-sdk-linux-02.00.01, smarc-ti-linux-3.12.10, smarc-ti-linux-3.12.y, smarc-ti-linux-3.14.y, smarc-ti-linux-3.15.y, smarc-ti-lsk-linux-4.1.y, smarct3x-processor-sdk-04.01.00.06, smarct3x-processor-sdk-linux-02.00.01, smarct3x-processor-sdk-linux-03.00.00.04, smarct4x-800-processor-sdk-linux-02.00.01, smarct4x-processor-sdk-04.01.00.06, smarct4x-processor-sdk-linux-02.00.01, smarct4x-processor-sdk-linux-03.00.00.04, ti-linux-3.12.y, ti-linux-3.14.y, ti-linux-3.15.y, ti-lsk-linux-4.1.y
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>
Showing
1 changed file
with
1 additions
and
1 deletions
Side-by-side Diff
... |
... |
@@ -2463,7 +2463,7 @@ |
2463
|
2463 |
struct mount *mnt = real_mount(m); |
2464
|
2464 |
mnt->mnt_ns = new_ns; |
2465
|
2465 |
new_ns->root = mnt; |
2466
|
|
- list_add(&new_ns->list, &mnt->mnt_list); |
|
2466 |
+ list_add(&mnt->mnt_list, &new_ns->list); |
2467
|
2467 |
} else { |
2468
|
2468 |
mntput(m); |
2469
|
2469 |
} |