aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namespace.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-02-22 20:42:14 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-22 20:42:14 -0500
commitbe5e6616dd74e17fdd8e16ca015cfef94d49b467 (patch)
treea18826e557f0d6636f1e05a4ec30d584ed981a2b /fs/namespace.c
parent90c453ca2214394eec602d98e6cb92d151908493 (diff)
parent0a280962dc6e117e0e4baa668453f753579265d9 (diff)
Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs updates from Al Viro: "Assorted stuff from this cycle. The big ones here are multilayer overlayfs from Miklos and beginning of sorting ->d_inode accesses out from David" * 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (51 commits) autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation procfs: fix race between symlink removals and traversals debugfs: leave freeing a symlink body until inode eviction Documentation/filesystems/Locking: ->get_sb() is long gone trylock_super(): replacement for grab_super_passive() fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry) SELinux: Use d_is_positive() rather than testing dentry->d_inode Smack: Use d_is_positive() rather than testing dentry->d_inode TOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR() Apparmor: Use d_is_positive/negative() rather than testing dentry->d_inode Apparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb VFS: Split DCACHE_FILE_TYPE into regular and special types VFS: Add a fallthrough flag for marking virtual dentries VFS: Add a whiteout dentry type VFS: Introduce inode-getting helpers for layered/unioned fs environments Infiniband: Fix potential NULL d_inode dereference posix_acl: fix reference leaks in posix_acl_create autofs4: Wrong format for printing dentry ...
Diffstat (limited to 'fs/namespace.c')
-rw-r--r--fs/namespace.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/namespace.c b/fs/namespace.c
index 72a286e0d33e..82ef1405260e 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1907,8 +1907,8 @@ static int graft_tree(struct mount *mnt, struct mount *p, struct mountpoint *mp)
1907 if (mnt->mnt.mnt_sb->s_flags & MS_NOUSER) 1907 if (mnt->mnt.mnt_sb->s_flags & MS_NOUSER)
1908 return -EINVAL; 1908 return -EINVAL;
1909 1909
1910 if (S_ISDIR(mp->m_dentry->d_inode->i_mode) != 1910 if (d_is_dir(mp->m_dentry) !=
1911 S_ISDIR(mnt->mnt.mnt_root->d_inode->i_mode)) 1911 d_is_dir(mnt->mnt.mnt_root))
1912 return -ENOTDIR; 1912 return -ENOTDIR;
1913 1913
1914 return attach_recursive_mnt(mnt, p, mp, NULL); 1914 return attach_recursive_mnt(mnt, p, mp, NULL);
@@ -2180,8 +2180,8 @@ static int do_move_mount(struct path *path, const char *old_name)
2180 if (!mnt_has_parent(old)) 2180 if (!mnt_has_parent(old))
2181 goto out1; 2181 goto out1;
2182 2182
2183 if (S_ISDIR(path->dentry->d_inode->i_mode) != 2183 if (d_is_dir(path->dentry) !=
2184 S_ISDIR(old_path.dentry->d_inode->i_mode)) 2184 d_is_dir(old_path.dentry))
2185 goto out1; 2185 goto out1;
2186 /* 2186 /*
2187 * Don't move a mount residing in a shared parent. 2187 * Don't move a mount residing in a shared parent.
@@ -2271,7 +2271,7 @@ static int do_add_mount(struct mount *newmnt, struct path *path, int mnt_flags)
2271 goto unlock; 2271 goto unlock;
2272 2272
2273 err = -EINVAL; 2273 err = -EINVAL;
2274 if (S_ISLNK(newmnt->mnt.mnt_root->d_inode->i_mode)) 2274 if (d_is_symlink(newmnt->mnt.mnt_root))
2275 goto unlock; 2275 goto unlock;
2276 2276
2277 newmnt->mnt.mnt_flags = mnt_flags; 2277 newmnt->mnt.mnt_flags = mnt_flags;