aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4proc.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2007-07-31 03:37:51 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-31 18:39:38 -0400
commit749997e5127a1df6b68a10c686af3f5b819a41a2 (patch)
tree73ca2d3c6b90de172c777dec052cfa83898e6db9 /fs/nfsd/nfs4proc.c
parent421cee293587081efef165b137514884b8472565 (diff)
knfsd: set the response bitmask for NFS4_CREATE_EXCLUSIVE
RFC 3530 says: If the server uses an attribute to store the exclusive create verifier, it will signify which attribute by setting the appropriate bit in the attribute mask that is returned in the results. Linux uses the atime and mtime to store the verifier, but sends a zeroed out bitmask back to the client. This patch makes sure that we set the correct bits in the bitmask in this situation. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Cc: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r--fs/nfsd/nfs4proc.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 3c627128e205..29b7e63cb32c 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -100,7 +100,15 @@ do_open_lookup(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_o
100 status = nfsd_create_v3(rqstp, current_fh, open->op_fname.data, 100 status = nfsd_create_v3(rqstp, current_fh, open->op_fname.data,
101 open->op_fname.len, &open->op_iattr, 101 open->op_fname.len, &open->op_iattr,
102 &resfh, open->op_createmode, 102 &resfh, open->op_createmode,
103 (u32 *)open->op_verf.data, &open->op_truncate, &created); 103 (u32 *)open->op_verf.data,
104 &open->op_truncate, &created);
105
106 /* If we ever decide to use different attrs to store the
107 * verifier in nfsd_create_v3, then we'll need to change this
108 */
109 if (open->op_createmode == NFS4_CREATE_EXCLUSIVE && status == 0)
110 open->op_bmval[1] |= (FATTR4_WORD1_TIME_ACCESS |
111 FATTR4_WORD1_TIME_MODIFY);
104 } else { 112 } else {
105 status = nfsd_lookup(rqstp, current_fh, 113 status = nfsd_lookup(rqstp, current_fh,
106 open->op_fname.data, open->op_fname.len, &resfh); 114 open->op_fname.data, open->op_fname.len, &resfh);