The patch titled knfsd: nfsd4: fix open flag passing has been added to the -mm tree. Its filename is knfsd-nfsd4-fix-open-flag-passing.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: knfsd: nfsd4: fix open flag passing From: J. Bruce Fields <bfields@xxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx> Signed-off-by: Neil Brown <neilb@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/nfsd/nfs4state.c | 6 +++--- fs/nfsd/vfs.c | 5 ++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff -puN fs/nfsd/nfs4state.c~knfsd-nfsd4-fix-open-flag-passing fs/nfsd/nfs4state.c --- a/fs/nfsd/nfs4state.c~knfsd-nfsd4-fix-open-flag-passing +++ a/fs/nfsd/nfs4state.c @@ -1790,10 +1790,10 @@ nfsd4_process_open2(struct svc_rqst *rqs } else { /* Stateid was not found, this is a new OPEN */ int flags = 0; + if (open->op_share_access & NFS4_SHARE_ACCESS_READ) + flags |= MAY_READ; if (open->op_share_access & NFS4_SHARE_ACCESS_WRITE) - flags = MAY_WRITE; - else - flags = MAY_READ; + flags |= MAY_WRITE; status = nfs4_new_open(rqstp, &stp, dp, current_fh, flags); if (status) goto out; diff -puN fs/nfsd/vfs.c~knfsd-nfsd4-fix-open-flag-passing fs/nfsd/vfs.c --- a/fs/nfsd/vfs.c~knfsd-nfsd4-fix-open-flag-passing +++ a/fs/nfsd/vfs.c @@ -673,7 +673,10 @@ nfsd_open(struct svc_rqst *rqstp, struct 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); } _ Patches currently in -mm which might be from bfields@xxxxxxxxxxxxxx are origin.patch knfsd-nfsd4-fix-open_confirm-locking.patch knfsd-nfsd-call-nfsd_setuser-on-fh_compose-fix-nfsd4-permissions-problem.patch knfsd-nfsd4-remove-superfluous-grace-period-checks.patch knfsd-nfsd-fix-misplaced-fh_unlock-in-nfsd_link.patch knfsd-svcrpc-gss-simplify-rsc_parse.patch knfsd-nfsd4-fix-some-open-argument-tests.patch knfsd-nfsd4-fix-open-flag-passing.patch knfsd-svcrpc-simplify-nfsd-rpcsec_gss-integrity-code.patch knfsd-nfsd-mark-rqstp-to-prevent-use-of-sendfile-in-privacy-case.patch knfsd-svcrpc-gss-server-side-implementation-of-rpcsec_gss-privacy.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html