nfsd4: ignore WANT bits in open downgrade
J. Bruce Fields [Mon, 10 Oct 2011 21:34:31 +0000 (17:34 -0400)]
commit c30e92df30d7d5fe65262fbce5d1b7de675fe34e upstream.

We don't use WANT bits yet--and sending them can probably trigger a
BUG() further down.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

fs/nfsd/nfs4state.c

index cd2a43d..6f8bcc7 100644 (file)
@@ -3570,6 +3570,8 @@ nfsd4_open_downgrade(struct svc_rqst *rqstp,
        if (!access_valid(od->od_share_access, cstate->minorversion)
                        || !deny_valid(od->od_share_deny))
                return nfserr_inval;
+       /* We don't yet support WANT bits: */
+       od->od_share_access &= NFS4_SHARE_ACCESS_MASK;
 
        nfs4_lock_state();
        if ((status = nfs4_preprocess_seqid_op(cstate,