From: Benny Halevy Date: Thu, 16 Feb 2012 18:57:00 +0000 (+0200) Subject: nfsd41: share_access_to_flags should consider only nfs4.x share_access flags X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=00b5f95a26f2f95b86e59cf86346b06ba14943ee;p=linux-beck.git nfsd41: share_access_to_flags should consider only nfs4.x share_access flags Currently, it will not correctly ignore any nfsv4.1 signal flags if the client sends them. Signed-off-by: Benny Halevy Signed-off-by: J. Bruce Fields --- diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index cf62079e9b71..f89ccc263905 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2637,7 +2637,7 @@ nfs4_check_delegmode(struct nfs4_delegation *dp, int flags) static int share_access_to_flags(u32 share_access) { - share_access &= ~NFS4_SHARE_WANT_MASK; + share_access &= NFS4_SHARE_ACCESS_MASK; return share_access == NFS4_SHARE_ACCESS_READ ? RD_STATE : WR_STATE; }