diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-18 17:20:16 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2005-10-18 17:20:16 -0400 |
commit | 834f2a4a1554dc5b2598038b3fe8703defcbe467 (patch) | |
tree | d27a000a2dd03029e6e2472c6e13801688185b51 /include/linux/namei.h | |
parent | 039c4d7a82d8268ec71f59679460b41d0dd9b225 (diff) |
VFS: Allow the filesystem to return a full file pointer on open intent
This is needed by NFSv4 for atomicity reasons: our open command is in
fact a lookup+open, so we need to be able to propagate open context
information from lookup() into the resulting struct file's
private_data field.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/namei.h')
-rw-r--r-- | include/linux/namei.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/namei.h b/include/linux/namei.h index 7db67b008cac..1c975d0d9e94 100644 --- a/include/linux/namei.h +++ b/include/linux/namei.h | |||
@@ -8,6 +8,7 @@ struct vfsmount; | |||
8 | struct open_intent { | 8 | struct open_intent { |
9 | int flags; | 9 | int flags; |
10 | int create_mode; | 10 | int create_mode; |
11 | struct file *file; | ||
11 | }; | 12 | }; |
12 | 13 | ||
13 | enum { MAX_NESTED_LINKS = 5 }; | 14 | enum { MAX_NESTED_LINKS = 5 }; |
@@ -65,6 +66,13 @@ extern int FASTCALL(link_path_walk(const char *, struct nameidata *)); | |||
65 | extern void path_release(struct nameidata *); | 66 | extern void path_release(struct nameidata *); |
66 | extern void path_release_on_umount(struct nameidata *); | 67 | extern void path_release_on_umount(struct nameidata *); |
67 | 68 | ||
69 | extern int __user_path_lookup_open(const char __user *, unsigned lookup_flags, struct nameidata *nd, int open_flags); | ||
70 | extern int path_lookup_open(const char *, unsigned lookup_flags, struct nameidata *, int open_flags); | ||
71 | extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, | ||
72 | int (*open)(struct inode *, struct file *)); | ||
73 | extern struct file *nameidata_to_filp(struct nameidata *nd, int flags); | ||
74 | extern void release_open_intent(struct nameidata *); | ||
75 | |||
68 | extern struct dentry * lookup_one_len(const char *, struct dentry *, int); | 76 | extern struct dentry * lookup_one_len(const char *, struct dentry *, int); |
69 | extern struct dentry * lookup_hash(struct qstr *, struct dentry *); | 77 | extern struct dentry * lookup_hash(struct qstr *, struct dentry *); |
70 | 78 | ||