Преглед изворни кода

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>
Al Viro пре 16 година
родитељ
комит
dd5cae6e97
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      fs/namespace.c

+ 1 - 1
fs/namespace.c

@@ -1698,7 +1698,7 @@ int do_add_mount(struct vfsmount *newmnt, struct path *path,
 	       follow_down(&path->mnt, &path->dentry))
 	       follow_down(&path->mnt, &path->dentry))
 		;
 		;
 	err = -EINVAL;
 	err = -EINVAL;
-	if (!check_mnt(path->mnt))
+	if (!(mnt_flags & MNT_SHRINKABLE) && !check_mnt(path->mnt))
 		goto unlock;
 		goto unlock;
 
 
 	/* Refuse the same filesystem on the same mount point */
 	/* Refuse the same filesystem on the same mount point */