linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nfsd: Correct read access checking
@ 2013-03-03  9:02 Yanchuan Nian
  2013-03-05 21:10 ` J. Bruce Fields
  0 siblings, 1 reply; 2+ messages in thread
From: Yanchuan Nian @ 2013-03-03  9:02 UTC (permalink / raw)
  To: bfields; +Cc: linux-nfs

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@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-05 21:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-03  9:02 [PATCH] nfsd: Correct read access checking Yanchuan Nian
2013-03-05 21:10 ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).