summaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorAl Viro2012-06-10 11:01:45 +0200
committerAl Viro2012-07-14 14:33:31 +0200
commit47237687d73cbeae1dd7a133c3fc3d7239094568 (patch)
tree1d267d03246f0a16cbff3c8221ee69dd1521f835 /include/linux/fs.h
parentvfs: move O_DIRECT check to common code (diff)
downloadkernel-qcow2-linux-47237687d73cbeae1dd7a133c3fc3d7239094568.tar.gz
kernel-qcow2-linux-47237687d73cbeae1dd7a133c3fc3d7239094568.tar.xz
kernel-qcow2-linux-47237687d73cbeae1dd7a133c3fc3d7239094568.zip
->atomic_open() prototype change - pass int * instead of bool *
... and let finish_open() report having opened the file via that sucker. Next step: don't modify od->filp at all. [AV: FILE_CREATE was already used by cifs; Miklos' fix folded] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 0314635cf833..a7618cf28d0e 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1696,7 +1696,7 @@ struct inode_operations {
int (*update_time)(struct inode *, struct timespec *, int);
struct file * (*atomic_open)(struct inode *, struct dentry *,
struct opendata *, unsigned open_flag,
- umode_t create_mode, bool *created);
+ umode_t create_mode, int *opened);
} ____cacheline_aligned;
struct seq_file;
@@ -2065,8 +2065,13 @@ extern struct file * dentry_open(struct dentry *, struct vfsmount *, int,
const struct cred *);
extern int filp_close(struct file *, fl_owner_t id);
extern char * getname(const char __user *);
+enum {
+ FILE_CREATED = 1,
+ FILE_OPENED = 2
+};
extern struct file *finish_open(struct opendata *od, struct dentry *dentry,
- int (*open)(struct inode *, struct file *));
+ int (*open)(struct inode *, struct file *),
+ int *opened);
extern void finish_no_open(struct opendata *od, struct dentry *dentry);
/* fs/ioctl.c */