aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/open.c b/fs/open.c
index 9b33c0cbfacf..e08643feb574 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -228,7 +228,7 @@ SYSCALL_ALIAS(sys_ftruncate64, SyS_ftruncate64);
228 228
229int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len) 229int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
230{ 230{
231 struct inode *inode = file->f_path.dentry->d_inode; 231 struct inode *inode = file_inode(file);
232 long ret; 232 long ret;
233 233
234 if (offset < 0 || len <= 0) 234 if (offset < 0 || len <= 0)
@@ -426,7 +426,7 @@ SYSCALL_DEFINE1(fchdir, unsigned int, fd)
426 if (!f.file) 426 if (!f.file)
427 goto out; 427 goto out;
428 428
429 inode = f.file->f_path.dentry->d_inode; 429 inode = file_inode(f.file);
430 430
431 error = -ENOTDIR; 431 error = -ENOTDIR;
432 if (!S_ISDIR(inode->i_mode)) 432 if (!S_ISDIR(inode->i_mode))
@@ -689,7 +689,7 @@ static int do_dentry_open(struct file *f,
689 f->f_mode = FMODE_PATH; 689 f->f_mode = FMODE_PATH;
690 690
691 path_get(&f->f_path); 691 path_get(&f->f_path);
692 inode = f->f_path.dentry->d_inode; 692 inode = file_inode(f);
693 if (f->f_mode & FMODE_WRITE) { 693 if (f->f_mode & FMODE_WRITE) {
694 error = __get_file_write_access(inode, f->f_path.mnt); 694 error = __get_file_write_access(inode, f->f_path.mnt);
695 if (error) 695 if (error)