nfsd41: add OPEN4_SHARE_ACCESS_WANT nfs4_stateid bmap
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / nfsd / nfs4state.c
index 374aaf3808e8490eb930b4a455d43c8e2fc5d09a..c65a27b76a9dd48f83f16de8452bfe0338094cb9 100644 (file)
@@ -1889,7 +1889,8 @@ init_stateid(struct nfs4_stateid *stp, struct nfs4_file *fp, struct nfsd4_open *
        stp->st_stateid.si_generation = 0;
        stp->st_access_bmap = 0;
        stp->st_deny_bmap = 0;
-       __set_bit(open->op_share_access, &stp->st_access_bmap);
+       __set_bit(open->op_share_access & ~NFS4_SHARE_WANT_MASK,
+                 &stp->st_access_bmap);
        __set_bit(open->op_share_deny, &stp->st_deny_bmap);
        stp->st_openstp = NULL;
 }