diff options
Diffstat (limited to 'include/linux/namei.h')
-rw-r--r-- | include/linux/namei.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/include/linux/namei.h b/include/linux/namei.h index 05b441d93642..eba45ea10298 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -19,7 +19,9 @@ struct nameidata { | |||
19 | struct path path; | 19 | struct path path; |
20 | struct qstr last; | 20 | struct qstr last; |
21 | struct path root; | 21 | struct path root; |
22 | struct inode *inode; /* path.dentry.d_inode */ | ||
22 | unsigned int flags; | 23 | unsigned int flags; |
24 | unsigned seq; | ||
23 | int last_type; | 25 | int last_type; |
24 | unsigned depth; | 26 | unsigned depth; |
25 | char *saved_names[MAX_NESTED_LINKS + 1]; | 27 | char *saved_names[MAX_NESTED_LINKS + 1]; |
@@ -41,14 +43,17 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; | |||
41 | * - require a directory | 43 | * - require a directory |
42 | * - ending slashes ok even for nonexistent files | 44 | * - ending slashes ok even for nonexistent files |
43 | * - internal "there are more path components" flag | 45 | * - internal "there are more path components" flag |
44 | * - locked when lookup done with dcache_lock held | ||
45 | * - dentry cache is untrusted; force a real lookup | 46 | * - dentry cache is untrusted; force a real lookup |
47 | * - suppress terminal automount | ||
46 | */ | 48 | */ |
47 | #define LOOKUP_FOLLOW 1 | 49 | #define LOOKUP_FOLLOW 0x0001 |
48 | #define LOOKUP_DIRECTORY 2 | 50 | #define LOOKUP_DIRECTORY 0x0002 |
49 | #define LOOKUP_CONTINUE 4 | 51 | #define LOOKUP_CONTINUE 0x0004 |
50 | #define LOOKUP_PARENT 16 | 52 | |
51 | #define LOOKUP_REVAL 64 | 53 | #define LOOKUP_PARENT 0x0010 |
54 | #define LOOKUP_REVAL 0x0020 | ||
55 | #define LOOKUP_RCU 0x0040 | ||
56 | #define LOOKUP_NO_AUTOMOUNT 0x0080 | ||
52 | /* | 57 | /* |
53 | * Intent data | 58 | * Intent data |
54 | */ | 59 | */ |
@@ -57,6 +62,10 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; | |||
57 | #define LOOKUP_EXCL 0x0400 | 62 | #define LOOKUP_EXCL 0x0400 |
58 | #define LOOKUP_RENAME_TARGET 0x0800 | 63 | #define LOOKUP_RENAME_TARGET 0x0800 |
59 | 64 | ||
65 | #define LOOKUP_JUMPED 0x1000 | ||
66 | #define LOOKUP_ROOT 0x2000 | ||
67 | #define LOOKUP_EMPTY 0x4000 | ||
68 | |||
60 | extern int user_path_at(int, const char __user *, unsigned, struct path *); | 69 | extern int user_path_at(int, const char __user *, unsigned, struct path *); |
61 | 70 | ||
62 | #define user_path(name, path) user_path_at(AT_FDCWD, name, LOOKUP_FOLLOW, path) | 71 | #define user_path(name, path) user_path_at(AT_FDCWD, name, LOOKUP_FOLLOW, path) |
@@ -66,7 +75,7 @@ extern int user_path_at(int, const char __user *, unsigned, struct path *); | |||
66 | 75 | ||
67 | extern int kern_path(const char *, unsigned, struct path *); | 76 | extern int kern_path(const char *, unsigned, struct path *); |
68 | 77 | ||
69 | extern int path_lookup(const char *, unsigned, struct nameidata *); | 78 | extern int kern_path_parent(const char *, struct nameidata *); |
70 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, | 79 | extern int vfs_path_lookup(struct dentry *, struct vfsmount *, |
71 | const char *, unsigned int, struct nameidata *); | 80 | const char *, unsigned int, struct nameidata *); |
72 | 81 | ||
@@ -75,6 +84,7 @@ extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry | |||
75 | 84 | ||
76 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); | 85 | extern struct dentry *lookup_one_len(const char *, struct dentry *, int); |
77 | 86 | ||
87 | extern int follow_down_one(struct path *); | ||
78 | extern int follow_down(struct path *); | 88 | extern int follow_down(struct path *); |
79 | extern int follow_up(struct path *); | 89 | extern int follow_up(struct path *); |
80 | 90 | ||