aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/namei.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/namei.h')
-rw-r--r--include/linux/namei.h24
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
60extern int user_path_at(int, const char __user *, unsigned, struct path *); 69extern 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
67extern int kern_path(const char *, unsigned, struct path *); 76extern int kern_path(const char *, unsigned, struct path *);
68 77
69extern int path_lookup(const char *, unsigned, struct nameidata *); 78extern int kern_path_parent(const char *, struct nameidata *);
70extern int vfs_path_lookup(struct dentry *, struct vfsmount *, 79extern 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
76extern struct dentry *lookup_one_len(const char *, struct dentry *, int); 85extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
77 86
87extern int follow_down_one(struct path *);
78extern int follow_down(struct path *); 88extern int follow_down(struct path *);
79extern int follow_up(struct path *); 89extern int follow_up(struct path *);
80 90