diff options
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/namei.c b/fs/namei.c index db1bca26d88c..e4f108f08230 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -297,7 +297,7 @@ int vfs_permission(struct nameidata *nd, int mask) | |||
297 | */ | 297 | */ |
298 | int file_permission(struct file *file, int mask) | 298 | int file_permission(struct file *file, int mask) |
299 | { | 299 | { |
300 | return permission(file->f_dentry->d_inode, mask, NULL); | 300 | return permission(file->f_path.dentry->d_inode, mask, NULL); |
301 | } | 301 | } |
302 | 302 | ||
303 | /* | 303 | /* |
@@ -333,7 +333,7 @@ int get_write_access(struct inode * inode) | |||
333 | 333 | ||
334 | int deny_write_access(struct file * file) | 334 | int deny_write_access(struct file * file) |
335 | { | 335 | { |
336 | struct inode *inode = file->f_dentry->d_inode; | 336 | struct inode *inode = file->f_path.dentry->d_inode; |
337 | 337 | ||
338 | spin_lock(&inode->i_lock); | 338 | spin_lock(&inode->i_lock); |
339 | if (atomic_read(&inode->i_writecount) > 0) { | 339 | if (atomic_read(&inode->i_writecount) > 0) { |
@@ -368,7 +368,7 @@ void path_release_on_umount(struct nameidata *nd) | |||
368 | */ | 368 | */ |
369 | void release_open_intent(struct nameidata *nd) | 369 | void release_open_intent(struct nameidata *nd) |
370 | { | 370 | { |
371 | if (nd->intent.open.file->f_dentry == NULL) | 371 | if (nd->intent.open.file->f_path.dentry == NULL) |
372 | put_filp(nd->intent.open.file); | 372 | put_filp(nd->intent.open.file); |
373 | else | 373 | else |
374 | fput(nd->intent.open.file); | 374 | fput(nd->intent.open.file); |
@@ -572,11 +572,6 @@ fail: | |||
572 | return PTR_ERR(link); | 572 | return PTR_ERR(link); |
573 | } | 573 | } |
574 | 574 | ||
575 | struct path { | ||
576 | struct vfsmount *mnt; | ||
577 | struct dentry *dentry; | ||
578 | }; | ||
579 | |||
580 | static inline void dput_path(struct path *path, struct nameidata *nd) | 575 | static inline void dput_path(struct path *path, struct nameidata *nd) |
581 | { | 576 | { |
582 | dput(path->dentry); | 577 | dput(path->dentry); |
@@ -1143,7 +1138,7 @@ static int fastcall do_path_lookup(int dfd, const char *name, | |||
1143 | if (!file) | 1138 | if (!file) |
1144 | goto out_fail; | 1139 | goto out_fail; |
1145 | 1140 | ||
1146 | dentry = file->f_dentry; | 1141 | dentry = file->f_path.dentry; |
1147 | 1142 | ||
1148 | retval = -ENOTDIR; | 1143 | retval = -ENOTDIR; |
1149 | if (!S_ISDIR(dentry->d_inode->i_mode)) | 1144 | if (!S_ISDIR(dentry->d_inode->i_mode)) |
@@ -1153,7 +1148,7 @@ static int fastcall do_path_lookup(int dfd, const char *name, | |||
1153 | if (retval) | 1148 | if (retval) |
1154 | goto fput_fail; | 1149 | goto fput_fail; |
1155 | 1150 | ||
1156 | nd->mnt = mntget(file->f_vfsmnt); | 1151 | nd->mnt = mntget(file->f_path.mnt); |
1157 | nd->dentry = dget(dentry); | 1152 | nd->dentry = dget(dentry); |
1158 | 1153 | ||
1159 | fput_light(file, fput_needed); | 1154 | fput_light(file, fput_needed); |