aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/open.c b/fs/open.c
index 3b56192816ca..0d94319e8681 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -165,7 +165,7 @@ asmlinkage long sys_fstatfs(unsigned int fd, struct statfs __user * buf)
165 file = fget(fd); 165 file = fget(fd);
166 if (!file) 166 if (!file)
167 goto out; 167 goto out;
168 error = vfs_statfs_native(file->f_dentry, &tmp); 168 error = vfs_statfs_native(file->f_path.dentry, &tmp);
169 if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) 169 if (!error && copy_to_user(buf, &tmp, sizeof(tmp)))
170 error = -EFAULT; 170 error = -EFAULT;
171 fput(file); 171 fput(file);
@@ -186,7 +186,7 @@ asmlinkage long sys_fstatfs64(unsigned int fd, size_t sz, struct statfs64 __user
186 file = fget(fd); 186 file = fget(fd);
187 if (!file) 187 if (!file)
188 goto out; 188 goto out;
189 error = vfs_statfs64(file->f_dentry, &tmp); 189 error = vfs_statfs64(file->f_path.dentry, &tmp);
190 if (!error && copy_to_user(buf, &tmp, sizeof(tmp))) 190 if (!error && copy_to_user(buf, &tmp, sizeof(tmp)))
191 error = -EFAULT; 191 error = -EFAULT;
192 fput(file); 192 fput(file);
@@ -302,7 +302,7 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small)
302 if (file->f_flags & O_LARGEFILE) 302 if (file->f_flags & O_LARGEFILE)
303 small = 0; 303 small = 0;
304 304
305 dentry = file->f_dentry; 305 dentry = file->f_path.dentry;
306 inode = dentry->d_inode; 306 inode = dentry->d_inode;
307 error = -EINVAL; 307 error = -EINVAL;
308 if (!S_ISREG(inode->i_mode) || !(file->f_mode & FMODE_WRITE)) 308 if (!S_ISREG(inode->i_mode) || !(file->f_mode & FMODE_WRITE))
@@ -448,8 +448,8 @@ asmlinkage long sys_fchdir(unsigned int fd)
448 if (!file) 448 if (!file)
449 goto out; 449 goto out;
450 450
451 dentry = file->f_dentry; 451 dentry = file->f_path.dentry;
452 mnt = file->f_vfsmnt; 452 mnt = file->f_path.mnt;
453 inode = dentry->d_inode; 453 inode = dentry->d_inode;
454 454
455 error = -ENOTDIR; 455 error = -ENOTDIR;
@@ -503,7 +503,7 @@ asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
503 if (!file) 503 if (!file)
504 goto out; 504 goto out;
505 505
506 dentry = file->f_dentry; 506 dentry = file->f_path.dentry;
507 inode = dentry->d_inode; 507 inode = dentry->d_inode;
508 508
509 audit_inode(NULL, inode); 509 audit_inode(NULL, inode);
@@ -662,7 +662,7 @@ asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group)
662 if (!file) 662 if (!file)
663 goto out; 663 goto out;
664 664
665 dentry = file->f_dentry; 665 dentry = file->f_path.dentry;
666 audit_inode(NULL, dentry->d_inode); 666 audit_inode(NULL, dentry->d_inode);
667 error = chown_common(dentry, user, group); 667 error = chown_common(dentry, user, group);
668 fput(file); 668 fput(file);
@@ -688,8 +688,8 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt,
688 } 688 }
689 689
690 f->f_mapping = inode->i_mapping; 690 f->f_mapping = inode->i_mapping;
691 f->f_dentry = dentry; 691 f->f_path.dentry = dentry;
692 f->f_vfsmnt = mnt; 692 f->f_path.mnt = mnt;
693 f->f_pos = 0; 693 f->f_pos = 0;
694 f->f_op = fops_get(inode->i_fop); 694 f->f_op = fops_get(inode->i_fop);
695 file_move(f, &inode->i_sb->s_files); 695 file_move(f, &inode->i_sb->s_files);
@@ -723,8 +723,8 @@ cleanup_all:
723 if (f->f_mode & FMODE_WRITE) 723 if (f->f_mode & FMODE_WRITE)
724 put_write_access(inode); 724 put_write_access(inode);
725 file_kill(f); 725 file_kill(f);
726 f->f_dentry = NULL; 726 f->f_path.dentry = NULL;
727 f->f_vfsmnt = NULL; 727 f->f_path.mnt = NULL;
728cleanup_file: 728cleanup_file:
729 put_filp(f); 729 put_filp(f);
730 dput(dentry); 730 dput(dentry);
@@ -822,7 +822,7 @@ struct file *nameidata_to_filp(struct nameidata *nd, int flags)
822 /* Pick up the filp from the open intent */ 822 /* Pick up the filp from the open intent */
823 filp = nd->intent.open.file; 823 filp = nd->intent.open.file;
824 /* Has the filesystem initialised the file for us? */ 824 /* Has the filesystem initialised the file for us? */
825 if (filp->f_dentry == NULL) 825 if (filp->f_path.dentry == NULL)
826 filp = __dentry_open(nd->dentry, nd->mnt, flags, filp, NULL); 826 filp = __dentry_open(nd->dentry, nd->mnt, flags, filp, NULL);
827 else 827 else
828 path_release(nd); 828 path_release(nd);
@@ -965,7 +965,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, int mode)
965 put_unused_fd(fd); 965 put_unused_fd(fd);
966 fd = PTR_ERR(f); 966 fd = PTR_ERR(f);
967 } else { 967 } else {
968 fsnotify_open(f->f_dentry); 968 fsnotify_open(f->f_path.dentry);
969 fd_install(fd, f); 969 fd_install(fd, f);
970 } 970 }
971 } 971 }