aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/vfs.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2006-06-30 04:56:17 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-30 14:25:40 -0400
commit9ecb6a08d84d0e795648d5add64f154bc406914b (patch)
tree007e079b6bde7c6b0b7758d218d006e9f6bcab5d /fs/nfsd/vfs.c
parentba5a6a19d83babe00be3711db3deee5c57587b8f (diff)
[PATCH] knfsd: nfsd4: fix open flag passing
Since nfsv4 actually keeps around the file descriptors it gets from open (instead of just using them for a single read or write operation), we need to make sure that we can do RDWR opens and not just RDONLY/WRONLY. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/vfs.c')
-rw-r--r--fs/nfsd/vfs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index f916b170e136..423e1ba07044 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -673,7 +673,10 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
673 goto out_nfserr; 673 goto out_nfserr;
674 674
675 if (access & MAY_WRITE) { 675 if (access & MAY_WRITE) {
676 flags = O_WRONLY|O_LARGEFILE; 676 if (access & MAY_READ)
677 flags = O_RDWR|O_LARGEFILE;
678 else
679 flags = O_WRONLY|O_LARGEFILE;
677 680
678 DQUOT_INIT(inode); 681 DQUOT_INIT(inode);
679 } 682 }