aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2010-06-16 09:52:27 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-06-22 13:24:03 -0400
commitd77d76ffb638bd013782138cca6d8f4918c5afd6 (patch)
tree42a05f3a926498d8c0fd7a766ec484c8da22789e /fs/nfs
parenta4432345352c2be157ed844603147ac2c82f209c (diff)
NFSv41: Clean up exclusive create
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4proc.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index d1ab0c36e939..5d87563d0c1a 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -744,19 +744,14 @@ static struct nfs4_opendata *nfs4_opendata_alloc(struct path *path,
744 p->o_arg.server = server; 744 p->o_arg.server = server;
745 p->o_arg.bitmask = server->attr_bitmask; 745 p->o_arg.bitmask = server->attr_bitmask;
746 p->o_arg.claim = NFS4_OPEN_CLAIM_NULL; 746 p->o_arg.claim = NFS4_OPEN_CLAIM_NULL;
747 if (flags & O_EXCL) { 747 if (flags & O_CREAT) {
748 if (nfs4_has_persistent_session(server->nfs_client)) { 748 u32 *s;
749 /* GUARDED */ 749
750 p->o_arg.u.attrs = &p->attrs;
751 memcpy(&p->attrs, attrs, sizeof(p->attrs));
752 } else { /* EXCLUSIVE4_1 */
753 u32 *s = (u32 *) p->o_arg.u.verifier.data;
754 s[0] = jiffies;
755 s[1] = current->pid;
756 }
757 } else if (flags & O_CREAT) {
758 p->o_arg.u.attrs = &p->attrs; 750 p->o_arg.u.attrs = &p->attrs;
759 memcpy(&p->attrs, attrs, sizeof(p->attrs)); 751 memcpy(&p->attrs, attrs, sizeof(p->attrs));
752 s = (u32 *) p->o_arg.u.verifier.data;
753 s[0] = jiffies;
754 s[1] = current->pid;
760 } 755 }
761 p->c_arg.fh = &p->o_res.fh; 756 p->c_arg.fh = &p->o_res.fh;
762 p->c_arg.stateid = &p->o_res.stateid; 757 p->c_arg.stateid = &p->o_res.stateid;