summaryrefslogtreecommitdiffstats
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 e3441f58d2e1..68354466879f 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -704,7 +704,7 @@ static int do_dentry_open(struct file *f,
f->f_mode = FMODE_PATH;
path_get(&f->f_path);
- inode = file_inode(f);
+ inode = f->f_inode = f->f_path.dentry->d_inode;
if (f->f_mode & FMODE_WRITE) {
error = __get_file_write_access(inode, f->f_path.mnt);
if (error)
@@ -767,6 +767,7 @@ cleanup_file:
path_put(&f->f_path);
f->f_path.mnt = NULL;
f->f_path.dentry = NULL;
+ f->f_inode = NULL;
return error;
}