diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-01 19:30:41 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-10 21:32:13 -0500 |
| commit | 1f55a6ec940fb45e3edaa52b6e9fc40cf8e18dcb (patch) | |
| tree | 67cd7ee3eb2546116d1a322b4bbaf7b6f82a80f5 /include | |
| parent | 707c5960f102f8cdafb9406047b158abc71b391f (diff) | |
make nameidata completely opaque outside of fs/namei.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/namei.h | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/include/linux/namei.h b/include/linux/namei.h index 492de72560fa..c8990779f0c3 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
| @@ -7,21 +7,10 @@ | |||
| 7 | #include <linux/path.h> | 7 | #include <linux/path.h> |
| 8 | 8 | ||
| 9 | struct vfsmount; | 9 | struct vfsmount; |
| 10 | struct nameidata; | ||
| 10 | 11 | ||
| 11 | enum { MAX_NESTED_LINKS = 8 }; | 12 | enum { MAX_NESTED_LINKS = 8 }; |
| 12 | 13 | ||
| 13 | struct nameidata { | ||
| 14 | struct path path; | ||
| 15 | struct qstr last; | ||
| 16 | struct path root; | ||
| 17 | struct inode *inode; /* path.dentry.d_inode */ | ||
| 18 | unsigned int flags; | ||
| 19 | unsigned seq, m_seq; | ||
| 20 | int last_type; | ||
| 21 | unsigned depth; | ||
| 22 | char *saved_names[MAX_NESTED_LINKS + 1]; | ||
| 23 | }; | ||
| 24 | |||
| 25 | /* | 14 | /* |
| 26 | * Type of the last component on LOOKUP_PARENT | 15 | * Type of the last component on LOOKUP_PARENT |
| 27 | */ | 16 | */ |
| @@ -82,16 +71,8 @@ extern struct dentry *lock_rename(struct dentry *, struct dentry *); | |||
| 82 | extern void unlock_rename(struct dentry *, struct dentry *); | 71 | extern void unlock_rename(struct dentry *, struct dentry *); |
| 83 | 72 | ||
| 84 | extern void nd_jump_link(struct nameidata *nd, struct path *path); | 73 | extern void nd_jump_link(struct nameidata *nd, struct path *path); |
| 85 | 74 | extern void nd_set_link(struct nameidata *nd, char *path); | |
| 86 | static inline void nd_set_link(struct nameidata *nd, char *path) | 75 | extern char *nd_get_link(struct nameidata *nd); |
| 87 | { | ||
| 88 | nd->saved_names[nd->depth] = path; | ||
| 89 | } | ||
| 90 | |||
| 91 | static inline char *nd_get_link(struct nameidata *nd) | ||
| 92 | { | ||
| 93 | return nd->saved_names[nd->depth]; | ||
| 94 | } | ||
| 95 | 76 | ||
| 96 | static inline void nd_terminate_link(void *name, size_t len, size_t maxlen) | 77 | static inline void nd_terminate_link(void *name, size_t len, size_t maxlen) |
| 97 | { | 78 | { |
