summaryrefslogtreecommitdiff
path: root/fs/nfs/dir.c
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 16:33:31 +0400
commit47237687d73cbeae1dd7a133c3fc3d7239094568 (patch)
tree1d267d03246f0a16cbff3c8221ee69dd1521f835 /fs/nfs/dir.c
parenta8277b9baa6268de386529a33061775bc716198b (diff)
downloadlinux-3.10-47237687d73cbeae1dd7a133c3fc3d7239094568.tar.gz
linux-3.10-47237687d73cbeae1dd7a133c3fc3d7239094568.tar.bz2
linux-3.10-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 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index e6d55dc93ff..6deb2549ead 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -113,7 +113,7 @@ const struct inode_operations nfs3_dir_inode_operations = {
static struct file *nfs_atomic_open(struct inode *, struct dentry *,
struct opendata *, unsigned, umode_t,
- bool *);
+ int *);
const struct inode_operations nfs4_dir_inode_operations = {
.create = nfs_create,
.lookup = nfs_lookup,
@@ -1389,7 +1389,8 @@ static int do_open(struct inode *inode, struct file *filp)
static struct file *nfs_finish_open(struct nfs_open_context *ctx,
struct dentry *dentry,
- struct opendata *od, unsigned open_flags)
+ struct opendata *od, unsigned open_flags,
+ int *opened)
{
struct file *filp;
int err;
@@ -1408,7 +1409,7 @@ static struct file *nfs_finish_open(struct nfs_open_context *ctx,
}
}
- filp = finish_open(od, dentry, do_open);
+ filp = finish_open(od, dentry, do_open, opened);
if (!IS_ERR(filp))
nfs_file_set_open_context(filp, ctx);
@@ -1419,7 +1420,7 @@ out:
static struct file *nfs_atomic_open(struct inode *dir, struct dentry *dentry,
struct opendata *od, unsigned open_flags,
- umode_t mode, bool *created)
+ umode_t mode, int *opened)
{
struct nfs_open_context *ctx;
struct dentry *res;
@@ -1497,7 +1498,7 @@ static struct file *nfs_atomic_open(struct inode *dir, struct dentry *dentry,
nfs_unblock_sillyrename(dentry->d_parent);
nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
- filp = nfs_finish_open(ctx, dentry, od, open_flags);
+ filp = nfs_finish_open(ctx, dentry, od, open_flags, opened);
dput(res);
return filp;