summaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 4e686a0..74a907b 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -769,6 +769,7 @@ struct file {
} f_u;
struct path f_path;
#define f_dentry f_path.dentry
+ struct inode *f_inode; /* cached value */
const struct file_operations *f_op;
/*
@@ -2217,7 +2218,7 @@ static inline bool execute_ok(struct inode *inode)
static inline struct inode *file_inode(struct file *f)
{
- return f->f_path.dentry->d_inode;
+ return f->f_inode;
}
/*
OpenPOWER on IntegriCloud