diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2006-06-30 04:56:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-30 14:25:40 -0400 |
commit | 9ecb6a08d84d0e795648d5add64f154bc406914b (patch) | |
tree | 007e079b6bde7c6b0b7758d218d006e9f6bcab5d /fs/nfsd/nfs4state.c | |
parent | ba5a6a19d83babe00be3711db3deee5c57587b8f (diff) |
[PATCH] knfsd: nfsd4: fix open flag passing
Since nfsv4 actually keeps around the file descriptors it gets from open
(instead of just using them for a single read or write operation), we need to
make sure that we can do RDWR opens and not just RDONLY/WRONLY.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r-- | fs/nfsd/nfs4state.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 591dc6ba6e19..9daa0b9feb8d 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -1790,10 +1790,10 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf | |||
1790 | } else { | 1790 | } else { |
1791 | /* Stateid was not found, this is a new OPEN */ | 1791 | /* Stateid was not found, this is a new OPEN */ |
1792 | int flags = 0; | 1792 | int flags = 0; |
1793 | if (open->op_share_access & NFS4_SHARE_ACCESS_READ) | ||
1794 | flags |= MAY_READ; | ||
1793 | if (open->op_share_access & NFS4_SHARE_ACCESS_WRITE) | 1795 | if (open->op_share_access & NFS4_SHARE_ACCESS_WRITE) |
1794 | flags = MAY_WRITE; | 1796 | flags |= MAY_WRITE; |
1795 | else | ||
1796 | flags = MAY_READ; | ||
1797 | status = nfs4_new_open(rqstp, &stp, dp, current_fh, flags); | 1797 | status = nfs4_new_open(rqstp, &stp, dp, current_fh, flags); |
1798 | if (status) | 1798 | if (status) |
1799 | goto out; | 1799 | goto out; |