summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h3
-rw-r--r--include/linux/fs_struct.h4
-rw-r--r--include/linux/path.h4
3 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 4e686a09946..74a907b8b95 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;
}
/*
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h
index d0ae3a84bcf..729eded4b24 100644
--- a/include/linux/fs_struct.h
+++ b/include/linux/fs_struct.h
@@ -17,8 +17,8 @@ struct fs_struct {
extern struct kmem_cache *fs_cachep;
extern void exit_fs(struct task_struct *);
-extern void set_fs_root(struct fs_struct *, struct path *);
-extern void set_fs_pwd(struct fs_struct *, struct path *);
+extern void set_fs_root(struct fs_struct *, const struct path *);
+extern void set_fs_pwd(struct fs_struct *, const struct path *);
extern struct fs_struct *copy_fs_struct(struct fs_struct *);
extern void free_fs_struct(struct fs_struct *);
extern int unshare_fs_struct(void);
diff --git a/include/linux/path.h b/include/linux/path.h
index edc98dec626..d1372186f43 100644
--- a/include/linux/path.h
+++ b/include/linux/path.h
@@ -9,8 +9,8 @@ struct path {
struct dentry *dentry;
};
-extern void path_get(struct path *);
-extern void path_put(struct path *);
+extern void path_get(const struct path *);
+extern void path_put(const struct path *);
static inline int path_equal(const struct path *path1, const struct path *path2)
{