[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>
This commit is contained in:
committed by
Linus Torvalds
parent
ba5a6a19d8
commit
9ecb6a08d8
@@ -673,7 +673,10 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
|
||||
goto out_nfserr;
|
||||
|
||||
if (access & MAY_WRITE) {
|
||||
flags = O_WRONLY|O_LARGEFILE;
|
||||
if (access & MAY_READ)
|
||||
flags = O_RDWR|O_LARGEFILE;
|
||||
else
|
||||
flags = O_WRONLY|O_LARGEFILE;
|
||||
|
||||
DQUOT_INIT(inode);
|
||||
}
|
||||
|
Reference in New Issue
Block a user