Commit 1ea5482b authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] nfsd: set OPEN_RESULT_LOCKTYPE_POSIX in open()

We should set the OPEN_RESULT_LOCKTYPE_POSIX flag in the return to open, to
indicate that we support locking.
Signed-off-by: default avatarAndy Adamson <andros@citi.umich.edu>
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ce02bf8f
...@@ -1384,7 +1384,7 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf ...@@ -1384,7 +1384,7 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
/* /*
* To finish the open response, we just need to set the rflags. * To finish the open response, we just need to set the rflags.
*/ */
open->op_rflags = 0; open->op_rflags = NFS4_OPEN_RESULT_LOCKTYPE_POSIX;
if (!open->op_stateowner->so_confirmed) if (!open->op_stateowner->so_confirmed)
open->op_rflags |= NFS4_OPEN_RESULT_CONFIRM; open->op_rflags |= NFS4_OPEN_RESULT_CONFIRM;
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#define NFS4_FH_VOL_RENAME 0x0008 #define NFS4_FH_VOL_RENAME 0x0008
#define NFS4_OPEN_RESULT_CONFIRM 0x0002 #define NFS4_OPEN_RESULT_CONFIRM 0x0002
#define NFS4_OPEN_RESULT_LOCKTYPE_POSIX 0x0004
#define NFS4_SHARE_ACCESS_READ 0x0001 #define NFS4_SHARE_ACCESS_READ 0x0001
#define NFS4_SHARE_ACCESS_WRITE 0x0002 #define NFS4_SHARE_ACCESS_WRITE 0x0002
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment