ath9k_hw: Fix fixed antenna for AR9462
[cascardo/linux.git] / fs / open.c
index e3441f5..6835446 100644 (file)
--- 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;
 }