Don't bother with check_mnt() in do_add_mount() on shrinkable ones

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Linux Kernel Mailing List
Date: Thursday, June 11, 2009 - 8:59 pm

Gitweb:     http://git.kernel.org/linus/dd5cae6e9772ecc62fd374f7a8ec10eb51c96c4d
Commit:     dd5cae6e9772ecc62fd374f7a8ec10eb51c96c4d
Parent:     5b857119538daac7118c1364d7ff3613f12b84d3
Author:     Al Viro <viro@zeniv.linux.org.uk>
AuthorDate: Tue Apr 7 12:21:18 2009 -0400
Committer:  Al Viro <viro@zeniv.linux.org.uk>
CommitDate: Thu Jun 11 21:35:59 2009 -0400

    Don't bother with check_mnt() in do_add_mount() on shrinkable ones
    
    These guys are what we add as submounts; checks for "is that attached in
    our namespace" are simply irrelevant for those and counterproductive for
    use of private vfsmount trees a-la what NFS folks want.
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 fs/namespace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/namespace.c b/fs/namespace.c
index 134d494..88a904d 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1698,7 +1698,7 @@ int do_add_mount(struct vfsmount *newmnt, struct path *path,
 	       follow_down(&path->mnt, &path->dentry))
 		;
 	err = -EINVAL;
-	if (!check_mnt(path->mnt))
+	if (!(mnt_flags & MNT_SHRINKABLE) && !check_mnt(path->mnt))
 		goto unlock;
 
 	/* Refuse the same filesystem on the same mount point */
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Don't bother with check_mnt() in do_add_mount() on shrinka ..., Linux Kernel Mailing ..., (Thu Jun 11, 8:59 pm)