Преглед изворни кода

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 <bhalevy@tonian.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Benny Halevy пре 13 година
родитељ
комит
00b5f95a26
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      fs/nfsd/nfs4state.c

+ 1 - 1
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)
 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;
 	return share_access == NFS4_SHARE_ACCESS_READ ? RD_STATE : WR_STATE;
 }
 }