nfsd4: ignore WANT bits in open downgrade
authorJ. Bruce Fields <bfields@redhat.com>
Mon, 10 Oct 2011 21:34:31 +0000 (17:34 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 10 Oct 2011 22:05:20 +0000 (18:05 -0400)
We don't use WANT bits yet--and sending them can probably trigger a
BUG() further down.

Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c

index 683885b18ceba9bb56ca4cadebf87d01b7feb846..a39a542d8be5642760ac5b6d6b7bddc34cb9fea4 100644 (file)
@@ -3574,6 +3574,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();
        status = nfs4_preprocess_confirmed_seqid_op(cstate, od->od_seqid,