diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-06-26 05:17:17 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 09:43:56 +0400 |
commit | dd7dd556e45133ef13f2c4bddc0e0b1ac23bc0e4 (patch) | |
tree | 4884b6af570a2a0cb01d11f39a38a3a9c73e49ba /fs/nfs | |
parent | bf6c7f6c7bd0ea779757d35b5fdc9f9157f056b3 (diff) | |
download | linux-dd7dd556e45133ef13f2c4bddc0e0b1ac23bc0e4.tar.xz |
no need to check for LOOKUP_OPEN in ->create() instances
... it will be set in nd->flag for all cases with non-NULL nd
(i.e. when called from do_last()).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index b5f63a50fa7f..77ae95f15497 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1585,7 +1585,7 @@ static int nfs_open_create(struct inode *dir, struct dentry *dentry, int mode, attr.ia_mode = mode; attr.ia_valid = ATTR_MODE; - if (nd && (nd->flags & LOOKUP_OPEN) != 0) + if (nd) open_flags = nd->intent.open.flags; ctx = create_nfs_open_context(dentry, open_flags); @@ -1596,7 +1596,7 @@ static int nfs_open_create(struct inode *dir, struct dentry *dentry, int mode, error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, ctx); if (error != 0) goto out_put_ctx; - if (nd && (nd->flags & LOOKUP_OPEN) != 0) { + if (nd) { error = nfs_intent_set_file(nd, ctx); if (error < 0) goto out_err; @@ -1675,7 +1675,7 @@ static int nfs_create(struct inode *dir, struct dentry *dentry, int mode, attr.ia_mode = mode; attr.ia_valid = ATTR_MODE; - if (nd && (nd->flags & LOOKUP_OPEN) != 0) + if (nd) open_flags = nd->intent.open.flags; error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, NULL); |