summaryrefslogtreecommitdiffstats
path: root/fs/pnode.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2014-12-18 20:10:48 +0100
committerEric W. Biederman <ebiederm@xmission.com>2015-04-03 03:34:18 +0200
commitc003b26ff98ca04a180ff34c38c007a3998d62f9 (patch)
tree0d48f9edeed164c03b02494cf129ef76a0ffb91c /fs/pnode.c
parentmnt: Don't propagate umounts in __detach_mounts (diff)
downloadlinux-c003b26ff98ca04a180ff34c38c007a3998d62f9.tar.xz
linux-c003b26ff98ca04a180ff34c38c007a3998d62f9.zip
mnt: In umount_tree reuse mnt_list instead of mnt_hash
umount_tree builds a list of mounts that need to be unmounted. Utilize mnt_list for this purpose instead of mnt_hash. This begins to allow keeping a mount on the mnt_hash after it is unmounted, which is necessary for a properly functioning MNT_LOCKED implementation. The fact that mnt_list is an ordinary list makding available list_move is nice bonus. Cc: stable@vger.kernel.org Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'fs/pnode.c')
-rw-r--r--fs/pnode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/pnode.c b/fs/pnode.c
index 260ac8f898a4..bf012af709dd 100644
--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -384,7 +384,7 @@ static void __propagate_umount(struct mount *mnt)
if (child && list_empty(&child->mnt_mounts)) {
list_del_init(&child->mnt_child);
hlist_del_init_rcu(&child->mnt_hash);
- hlist_add_before_rcu(&child->mnt_hash, &mnt->mnt_hash);
+ list_move_tail(&child->mnt_list, &mnt->mnt_list);
}
}
}
@@ -396,11 +396,11 @@ static void __propagate_umount(struct mount *mnt)
*
* vfsmount lock must be held for write
*/
-int propagate_umount(struct hlist_head *list)
+int propagate_umount(struct list_head *list)
{
struct mount *mnt;
- hlist_for_each_entry(mnt, list, mnt_hash)
+ list_for_each_entry(mnt, list, mnt_list)
__propagate_umount(mnt);
return 0;
}