diff --git a/fs/namespace.c b/fs/namespace.c index d82cf18a1a947b381603b28ef9765b3be41aef39..2b4635e43ae84024cac1564231a834f93afc6590 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -829,6 +829,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