aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-10 05:01:45 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-14 08:33:31 -0400
commit47237687d73cbeae1dd7a133c3fc3d7239094568 (patch)
tree1d267d03246f0a16cbff3c8221ee69dd1521f835 /fs/9p
parenta8277b9baa6268de386529a33061775bc716198b (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/9p')
-rw-r--r--fs/9p/vfs_inode.c6
-rw-r--r--fs/9p/vfs_inode_dotl.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index e8c42ceb89ba..de626b3b342f 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -859,7 +859,7 @@ error:
859static struct file * 859static struct file *
860v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry, 860v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
861 struct opendata *od, unsigned flags, umode_t mode, 861 struct opendata *od, unsigned flags, umode_t mode,
862 bool *created) 862 int *opened)
863{ 863{
864 int err; 864 int err;
865 u32 perm; 865 u32 perm;
@@ -918,7 +918,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
918 v9inode->writeback_fid = (void *) inode_fid; 918 v9inode->writeback_fid = (void *) inode_fid;
919 } 919 }
920 mutex_unlock(&v9inode->v_mutex); 920 mutex_unlock(&v9inode->v_mutex);
921 filp = finish_open(od, dentry, generic_file_open); 921 filp = finish_open(od, dentry, generic_file_open, opened);
922 if (IS_ERR(filp)) { 922 if (IS_ERR(filp)) {
923 err = PTR_ERR(filp); 923 err = PTR_ERR(filp);
924 goto error; 924 goto error;
@@ -930,7 +930,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
930 v9fs_cache_inode_set_cookie(dentry->d_inode, filp); 930 v9fs_cache_inode_set_cookie(dentry->d_inode, filp);
931#endif 931#endif
932 932
933 *created = true; 933 *opened |= FILE_CREATED;
934out: 934out:
935 dput(res); 935 dput(res);
936 return filp; 936 return filp;
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index a354fe2cb234..3db55471bc93 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -243,7 +243,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
243static struct file * 243static struct file *
244v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry, 244v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
245 struct opendata *od, unsigned flags, umode_t omode, 245 struct opendata *od, unsigned flags, umode_t omode,
246 bool *created) 246 int *opened)
247{ 247{
248 int err = 0; 248 int err = 0;
249 gid_t gid; 249 gid_t gid;
@@ -357,7 +357,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
357 } 357 }
358 mutex_unlock(&v9inode->v_mutex); 358 mutex_unlock(&v9inode->v_mutex);
359 /* Since we are opening a file, assign the open fid to the file */ 359 /* Since we are opening a file, assign the open fid to the file */
360 filp = finish_open(od, dentry, generic_file_open); 360 filp = finish_open(od, dentry, generic_file_open, opened);
361 if (IS_ERR(filp)) { 361 if (IS_ERR(filp)) {
362 err = PTR_ERR(filp); 362 err = PTR_ERR(filp);
363 goto err_clunk_old_fid; 363 goto err_clunk_old_fid;
@@ -367,7 +367,7 @@ v9fs_vfs_atomic_open_dotl(struct inode *dir, struct dentry *dentry,
367 if (v9ses->cache) 367 if (v9ses->cache)
368 v9fs_cache_inode_set_cookie(inode, filp); 368 v9fs_cache_inode_set_cookie(inode, filp);
369#endif 369#endif
370 *created = true; 370 *opened |= FILE_CREATED;
371out: 371out:
372 dput(res); 372 dput(res);
373 return filp; 373 return filp;