diff options
Diffstat (limited to 'fs/namespace.c')
-rw-r--r-- | fs/namespace.c | 10 |
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; |