]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | Git: dd5cae6e9772ecc62fd374f7a8ec10eb51c96c4d |
2 | From: Al Viro <viro@zeniv.linux.org.uk> | |
3 | Subject: Don't bother with check_mnt() in do_add_mount() on shrinkable ones | |
4 | Date: Tue Apr 7 12:21:18 2009 -0400 | |
5 | Patch-mainline: 2.7.30 | |
6 | References: bnc#490030, bnc#531633 | |
7 | ||
8 | These guys are what we add as submounts; checks for "is that attached in | |
9 | our namespace" are simply irrelevant for those and counterproductive for | |
10 | use of private vfsmount trees a-la what NFS folks want. | |
11 | ||
12 | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> | |
13 | Acked-by: NeilBrown <neilb@suse.de> | |
14 | ||
15 | --- | |
16 | fs/namespace.c | 2 +- | |
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | |
18 | ||
19 | --- linux-2.6.27-SLE11_BRANCH.orig/fs/namespace.c | |
20 | +++ linux-2.6.27-SLE11_BRANCH/fs/namespace.c | |
21 | @@ -1658,7 +1658,7 @@ int do_add_mount(struct vfsmount *newmnt | |
22 | follow_down(&path->mnt, &path->dentry)) | |
23 | ; | |
24 | err = -EINVAL; | |
25 | - if (!check_mnt(path->mnt)) | |
26 | + if (!(mnt_flags & MNT_SHRINKABLE) && !check_mnt(path->mnt)) | |
27 | goto unlock; | |
28 | ||
29 | /* Refuse the same filesystem on the same mount point */ |