aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2005-03-30 16:58:55 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-30 16:58:55 -0800
commit6b756e57399a22b346b0fd6d1ecdc5dd1748daa5 (patch)
tree3d49e3cef2f9b384c47dd52c1b9fb037675db2ea
parent05882be9f254e58ee0e13359949b493e89eb181b (diff)
downloadhistory-6b756e57399a22b346b0fd6d1ecdc5dd1748daa5.tar.gz
[PATCH] nfsd4: allow read on open for write
The rfc recommends allowing read using stateid's from opens that only requested write access, as clients may in some cases be unable to write without doing reads. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--fs/nfsd/nfs4state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 576dbdd917876a..c7cd71d039095f 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1928,7 +1928,8 @@ static inline int
access_permit_read(unsigned long access_bmap)
{
return test_bit(NFS4_SHARE_ACCESS_READ, &access_bmap) ||
- test_bit(NFS4_SHARE_ACCESS_BOTH, &access_bmap);
+ test_bit(NFS4_SHARE_ACCESS_BOTH, &access_bmap) ||
+ test_bit(NFS4_SHARE_ACCESS_WRITE, &access_bmap);
}
static inline int