[PATCH] nfsd: Correct read access checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



NFS4_SHARE_ACCESS_WRITE should not be tested in access_permit_read() for this
function just tests read permission, so remove it.

Signed-off-by: Yanchuan Nian <ycnian@xxxxxxxxx>
---
 fs/nfsd/nfs4state.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 16d39c6..75c873d 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3322,8 +3322,7 @@ static inline int
 access_permit_read(struct nfs4_ol_stateid *stp)
 {
 	return test_access(NFS4_SHARE_ACCESS_READ, stp) ||
-		test_access(NFS4_SHARE_ACCESS_BOTH, stp) ||
-		test_access(NFS4_SHARE_ACCESS_WRITE, stp);
+		test_access(NFS4_SHARE_ACCESS_BOTH, stp);
 }
 
 static inline int
-- 
1.8.0.1

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux