diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-08-10 03:44:55 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-17 09:19:23 -0700 |
commit | 73fc917ea7c15dc833e5c3e5b93c094ce15039b3 (patch) | |
tree | 2de1a3ee5713d0e4395940cd77fd1e573854431f /drivers/md/raid10.c | |
parent | 37fada67e1a24ae31c4a2717d81b5c311385d288 (diff) |
fix copy_tree() regression
commit 12a5b5294cb1896e9a3c9fca8ff5a7e3def4e8c6 upstream.
Since 3.14 we had copy_tree() get the shadowing wrong - if we had one
vfsmount shadowing another (i.e. if A is a slave of B, C is mounted
on A/foo, then D got mounted on B/foo creating D' on A/foo shadowed
by C), copy_tree() of A would make a copy of D' shadow the the copy of
C, not the other way around.
It's easy to fix, fortunately - just make sure that mount follows
the one that shadows it in mnt_child as well as in mnt_hash, and when
copy_tree() decides to attach a new mount, check if the last child
it has added to the same parent should be shadowing the new one.
And if it should, just use the same logics commit_tree() has - put the
new mount into the hash and children lists right after the one that
should shadow it.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/md/raid10.c')
0 files changed, 0 insertions, 0 deletions