diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-06-25 21:17:17 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 01:43:56 -0400 |
commit | dd7dd556e45133ef13f2c4bddc0e0b1ac23bc0e4 (patch) | |
tree | 4884b6af570a2a0cb01d11f39a38a3a9c73e49ba /fs/nfs/dir.c | |
parent | bf6c7f6c7bd0ea779757d35b5fdc9f9157f056b3 (diff) |
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/dir.c')
-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 b5f63a50fa7..77ae95f1549 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, | |||
1585 | attr.ia_mode = mode; | 1585 | attr.ia_mode = mode; |
1586 | attr.ia_valid = ATTR_MODE; | 1586 | attr.ia_valid = ATTR_MODE; |
1587 | 1587 | ||
1588 | if (nd && (nd->flags & LOOKUP_OPEN) != 0) | 1588 | if (nd) |
1589 | open_flags = nd->intent.open.flags; | 1589 | open_flags = nd->intent.open.flags; |
1590 | 1590 | ||
1591 | ctx = create_nfs_open_context(dentry, open_flags); | 1591 | 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, | |||
1596 | error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, ctx); | 1596 | error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, ctx); |
1597 | if (error != 0) | 1597 | if (error != 0) |
1598 | goto out_put_ctx; | 1598 | goto out_put_ctx; |
1599 | if (nd && (nd->flags & LOOKUP_OPEN) != 0) { | 1599 | if (nd) { |
1600 | error = nfs_intent_set_file(nd, ctx); | 1600 | error = nfs_intent_set_file(nd, ctx); |
1601 | if (error < 0) | 1601 | if (error < 0) |
1602 | goto out_err; | 1602 | goto out_err; |
@@ -1675,7 +1675,7 @@ static int nfs_create(struct inode *dir, struct dentry *dentry, int mode, | |||
1675 | attr.ia_mode = mode; | 1675 | attr.ia_mode = mode; |
1676 | attr.ia_valid = ATTR_MODE; | 1676 | attr.ia_valid = ATTR_MODE; |
1677 | 1677 | ||
1678 | if (nd && (nd->flags & LOOKUP_OPEN) != 0) | 1678 | if (nd) |
1679 | open_flags = nd->intent.open.flags; | 1679 | open_flags = nd->intent.open.flags; |
1680 | 1680 | ||
1681 | error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, NULL); | 1681 | error = NFS_PROTO(dir)->create(dir, dentry, &attr, open_flags, NULL); |