diff options
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 17 |
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; |