From dd5cae6e9772ecc62fd374f7a8ec10eb51c96c4d Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 7 Apr 2009 12:21:18 -0400 Subject: 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 --- fs/namespace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/namespace.c b/fs/namespace.c index 134d494158d9..88a904d5aa23 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 */ -- cgit v1.2.3