summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/namespace.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index d82cf18a1a9..2b4635e43ae 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -830,6 +830,15 @@ static void expire_mount(struct vfsmount *mnt, struct list_head *mounts)
spin_lock(&vfsmount_lock);
/*
+ * Check if mount is still attached, if not, let whoever holds it deal
+ * with the sucker
+ */
+ if (mnt->mnt_parent == mnt) {
+ spin_unlock(&vfsmount_lock);
+ return;
+ }
+
+ /*
* Check that it is still dead: the count should now be 2 - as
* contributed by the vfsmount parent and the mntget above
*/