Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 31422
b: refs/heads/master
c: 9ecb6a0
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields authored and Linus Torvalds committed Jun 30, 2006
1 parent 99ec1b7 commit b236557
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ba5a6a19d83babe00be3711db3deee5c57587b8f
refs/heads/master: 9ecb6a08d84d0e795648d5add64f154bc406914b
6 changes: 3 additions & 3 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1790,10 +1790,10 @@ nfsd4_process_open2(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nf
} else {
/* Stateid was not found, this is a new OPEN */
int flags = 0;
if (open->op_share_access & NFS4_SHARE_ACCESS_READ)
flags |= MAY_READ;
if (open->op_share_access & NFS4_SHARE_ACCESS_WRITE)
flags = MAY_WRITE;
else
flags = MAY_READ;
flags |= MAY_WRITE;
status = nfs4_new_open(rqstp, &stp, dp, current_fh, flags);
if (status)
goto out;
Expand Down
5 changes: 4 additions & 1 deletion trunk/fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,10 @@ nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
goto out_nfserr;

if (access & MAY_WRITE) {
flags = O_WRONLY|O_LARGEFILE;
if (access & MAY_READ)
flags = O_RDWR|O_LARGEFILE;
else
flags = O_WRONLY|O_LARGEFILE;

DQUOT_INIT(inode);
}
Expand Down

0 comments on commit b236557

Please sign in to comment.