diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-10 05:01:45 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-14 08:33:31 -0400 |
commit | 47237687d73cbeae1dd7a133c3fc3d7239094568 (patch) | |
tree | 1d267d03246f0a16cbff3c8221ee69dd1521f835 /fs/open.c | |
parent | a8277b9baa6268de386529a33061775bc716198b (diff) |
->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 'fs/open.c')
-rw-r--r-- | fs/open.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -782,7 +782,8 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt, | |||
782 | * filesystem callback is substituted. | 782 | * filesystem callback is substituted. |
783 | */ | 783 | */ |
784 | struct file *finish_open(struct opendata *od, struct dentry *dentry, | 784 | struct file *finish_open(struct opendata *od, struct dentry *dentry, |
785 | int (*open)(struct inode *, struct file *)) | 785 | int (*open)(struct inode *, struct file *), |
786 | int *opened) | ||
786 | { | 787 | { |
787 | struct file *res; | 788 | struct file *res; |
788 | 789 | ||
@@ -790,8 +791,10 @@ struct file *finish_open(struct opendata *od, struct dentry *dentry, | |||
790 | dget(dentry); | 791 | dget(dentry); |
791 | 792 | ||
792 | res = do_dentry_open(dentry, od->mnt, od->filp, open, current_cred()); | 793 | res = do_dentry_open(dentry, od->mnt, od->filp, open, current_cred()); |
793 | if (!IS_ERR(res)) | 794 | if (!IS_ERR(res)) { |
795 | *opened |= FILE_OPENED; | ||
794 | od->filp = NULL; | 796 | od->filp = NULL; |
797 | } | ||
795 | 798 | ||
796 | return res; | 799 | return res; |
797 | } | 800 | } |