diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-03 16:23:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-03-03 16:23:03 -0500 |
commit | 56a79b7b021bf1b08334e63c2c14b280e2dbf47a (patch) | |
tree | 0419233e6194f4f12073c9284852885aa8984bec /include | |
parent | 1c82315a12144cde732636e259d39e3ee81b3c5b (diff) | |
parent | dcf787f39162ce32ca325b3e784aba2d2444619a (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more VFS bits from Al Viro:
"Unfortunately, it looks like xattr series will have to wait until the
next cycle ;-/
This pile contains 9p cleanups and fixes (races in v9fs_fid_add()
etc), fixup for nommu breakage in shmem.c, several cleanups and a bit
more file_inode() work"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
constify path_get/path_put and fs_struct.c stuff
fix nommu breakage in shmem.c
cache the value of file_inode() in struct file
9p: if v9fs_fid_lookup() gets to asking server, it'd better have hashed dentry
9p: make sure ->lookup() adds fid to the right dentry
9p: untangle ->lookup() a bit
9p: double iput() in ->lookup() if d_materialise_unique() fails
9p: v9fs_fid_add() can't fail now
v9fs: get rid of v9fs_dentry
9p: turn fid->dlist into hlist
9p: don't bother with private lock in ->d_fsdata; dentry->d_lock will do just fine
more file_inode() open-coded instances
selinux: opened file can't have NULL or negative ->f_path.dentry
(In the meantime, the hlist traversal macros have changed, so this
required a semantic conflict fixup for the newly hlistified fid->dlist)
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 3 | ||||
-rw-r--r-- | include/linux/fs_struct.h | 4 | ||||
-rw-r--r-- | include/linux/path.h | 4 | ||||
-rw-r--r-- | include/net/9p/client.h | 2 |
4 files changed, 7 insertions, 6 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4e686a099465..74a907b8b950 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -769,6 +769,7 @@ struct file { | |||
769 | } f_u; | 769 | } f_u; |
770 | struct path f_path; | 770 | struct path f_path; |
771 | #define f_dentry f_path.dentry | 771 | #define f_dentry f_path.dentry |
772 | struct inode *f_inode; /* cached value */ | ||
772 | const struct file_operations *f_op; | 773 | const struct file_operations *f_op; |
773 | 774 | ||
774 | /* | 775 | /* |
@@ -2217,7 +2218,7 @@ static inline bool execute_ok(struct inode *inode) | |||
2217 | 2218 | ||
2218 | static inline struct inode *file_inode(struct file *f) | 2219 | static inline struct inode *file_inode(struct file *f) |
2219 | { | 2220 | { |
2220 | return f->f_path.dentry->d_inode; | 2221 | return f->f_inode; |
2221 | } | 2222 | } |
2222 | 2223 | ||
2223 | /* | 2224 | /* |
diff --git a/include/linux/fs_struct.h b/include/linux/fs_struct.h index d0ae3a84bcfb..729eded4b24f 100644 --- a/include/linux/fs_struct.h +++ b/include/linux/fs_struct.h | |||
@@ -17,8 +17,8 @@ struct fs_struct { | |||
17 | extern struct kmem_cache *fs_cachep; | 17 | extern struct kmem_cache *fs_cachep; |
18 | 18 | ||
19 | extern void exit_fs(struct task_struct *); | 19 | extern void exit_fs(struct task_struct *); |
20 | extern void set_fs_root(struct fs_struct *, struct path *); | 20 | extern void set_fs_root(struct fs_struct *, const struct path *); |
21 | extern void set_fs_pwd(struct fs_struct *, struct path *); | 21 | extern void set_fs_pwd(struct fs_struct *, const struct path *); |
22 | extern struct fs_struct *copy_fs_struct(struct fs_struct *); | 22 | extern struct fs_struct *copy_fs_struct(struct fs_struct *); |
23 | extern void free_fs_struct(struct fs_struct *); | 23 | extern void free_fs_struct(struct fs_struct *); |
24 | extern int unshare_fs_struct(void); | 24 | extern int unshare_fs_struct(void); |
diff --git a/include/linux/path.h b/include/linux/path.h index edc98dec6266..d1372186f431 100644 --- a/include/linux/path.h +++ b/include/linux/path.h | |||
@@ -9,8 +9,8 @@ struct path { | |||
9 | struct dentry *dentry; | 9 | struct dentry *dentry; |
10 | }; | 10 | }; |
11 | 11 | ||
12 | extern void path_get(struct path *); | 12 | extern void path_get(const struct path *); |
13 | extern void path_put(struct path *); | 13 | extern void path_put(const struct path *); |
14 | 14 | ||
15 | static inline int path_equal(const struct path *path1, const struct path *path2) | 15 | static inline int path_equal(const struct path *path1, const struct path *path2) |
16 | { | 16 | { |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 5ff70f433e87..4c7c01a73911 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -192,7 +192,7 @@ struct p9_fid { | |||
192 | void *rdir; | 192 | void *rdir; |
193 | 193 | ||
194 | struct list_head flist; | 194 | struct list_head flist; |
195 | struct list_head dlist; /* list of all fids attached to a dentry */ | 195 | struct hlist_node dlist; /* list of all fids attached to a dentry */ |
196 | }; | 196 | }; |
197 | 197 | ||
198 | /** | 198 | /** |