diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-18 13:51:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-18 13:51:11 -0400 |
commit | f539abece1b7e36fae6add4f9ea29203d40badcb (patch) | |
tree | 786c08f3131a1871ece13343c3fa3832930c1408 /fs/namei.c | |
parent | 3f6f7e6d57b8a0ae2810ae7aac70c51b6f2a6304 (diff) | |
parent | 24ff6663ccfdaf088dfa7acae489cb11ed4f43c4 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
fs: call security_d_instantiate in d_obtain_alias V2
lose 'mounting_here' argument in ->d_manage()
don't pass 'mounting_here' flag to follow_down()
change the locking order for namespace_sem
fix deadlock in pivot_root()
vfs: split off vfsmount-related parts of vfs_kern_mount()
Some fixes for pstore
kill simple_set_mnt()
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c index b912b7abe747..5a9a6c3094da 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -933,8 +933,7 @@ static int follow_managed(struct path *path, unsigned flags) | |||
933 | if (managed & DCACHE_MANAGE_TRANSIT) { | 933 | if (managed & DCACHE_MANAGE_TRANSIT) { |
934 | BUG_ON(!path->dentry->d_op); | 934 | BUG_ON(!path->dentry->d_op); |
935 | BUG_ON(!path->dentry->d_op->d_manage); | 935 | BUG_ON(!path->dentry->d_op->d_manage); |
936 | ret = path->dentry->d_op->d_manage(path->dentry, | 936 | ret = path->dentry->d_op->d_manage(path->dentry, false); |
937 | false, false); | ||
938 | if (ret < 0) | 937 | if (ret < 0) |
939 | return ret == -EISDIR ? 0 : ret; | 938 | return ret == -EISDIR ? 0 : ret; |
940 | } | 939 | } |
@@ -999,7 +998,7 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path, | |||
999 | struct vfsmount *mounted; | 998 | struct vfsmount *mounted; |
1000 | if (unlikely(path->dentry->d_flags & DCACHE_MANAGE_TRANSIT) && | 999 | if (unlikely(path->dentry->d_flags & DCACHE_MANAGE_TRANSIT) && |
1001 | !reverse_transit && | 1000 | !reverse_transit && |
1002 | path->dentry->d_op->d_manage(path->dentry, false, true) < 0) | 1001 | path->dentry->d_op->d_manage(path->dentry, true) < 0) |
1003 | return false; | 1002 | return false; |
1004 | mounted = __lookup_mnt(path->mnt, path->dentry, 1); | 1003 | mounted = __lookup_mnt(path->mnt, path->dentry, 1); |
1005 | if (!mounted) | 1004 | if (!mounted) |
@@ -1065,7 +1064,7 @@ failed: | |||
1065 | * Care must be taken as namespace_sem may be held (indicated by mounting_here | 1064 | * Care must be taken as namespace_sem may be held (indicated by mounting_here |
1066 | * being true). | 1065 | * being true). |
1067 | */ | 1066 | */ |
1068 | int follow_down(struct path *path, bool mounting_here) | 1067 | int follow_down(struct path *path) |
1069 | { | 1068 | { |
1070 | unsigned managed; | 1069 | unsigned managed; |
1071 | int ret; | 1070 | int ret; |
@@ -1086,7 +1085,7 @@ int follow_down(struct path *path, bool mounting_here) | |||
1086 | BUG_ON(!path->dentry->d_op); | 1085 | BUG_ON(!path->dentry->d_op); |
1087 | BUG_ON(!path->dentry->d_op->d_manage); | 1086 | BUG_ON(!path->dentry->d_op->d_manage); |
1088 | ret = path->dentry->d_op->d_manage( | 1087 | ret = path->dentry->d_op->d_manage( |
1089 | path->dentry, mounting_here, false); | 1088 | path->dentry, false); |
1090 | if (ret < 0) | 1089 | if (ret < 0) |
1091 | return ret == -EISDIR ? 0 : ret; | 1090 | return ret == -EISDIR ? 0 : ret; |
1092 | } | 1091 | } |