aboutsummaryrefslogtreecommitdiffstats
path: root/fs/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/open.c')
-rw-r--r--fs/open.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/open.c b/fs/open.c
index 62f907e3bc36..806d4589559f 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -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 = file_inode(f); 692 inode = f->f_inode = f->f_path.dentry->d_inode;
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)
@@ -752,6 +752,7 @@ cleanup_file:
752 path_put(&f->f_path); 752 path_put(&f->f_path);
753 f->f_path.mnt = NULL; 753 f->f_path.mnt = NULL;
754 f->f_path.dentry = NULL; 754 f->f_path.dentry = NULL;
755 f->f_inode = NULL;
755 return error; 756 return error;
756} 757}
757 758