Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333208
b: refs/heads/master
c: bbd3a8e
h: refs/heads/master
v: v3
  • Loading branch information
Weston Andros Adamson authored and Trond Myklebust committed Oct 2, 2012
1 parent dc95bb0 commit 3ba699b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: ddfc4e171292d63d7e3f8c95ff9c3ef9932870ce
refs/heads/master: bbd3a8eee82a2a6f4aa1cce60ccb014f25e5c560
6 changes: 3 additions & 3 deletions trunk/fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1661,10 +1661,10 @@ static int nfs4_opendata_access(struct rpc_cred *cred,
return 0;

mask = 0;
/* don't check MAY_WRITE - a newly created file may not have
* write mode bits, but POSIX allows the creating process to write */
if (fmode & FMODE_READ)
mask |= MAY_READ;
if (fmode & FMODE_WRITE)
mask |= MAY_WRITE;
if (fmode & FMODE_EXEC)
mask |= MAY_EXEC;

Expand All @@ -1673,7 +1673,7 @@ static int nfs4_opendata_access(struct rpc_cred *cred,
nfs_access_set_mask(&cache, opendata->o_res.access_result);
nfs_access_add_cache(state->inode, &cache);

if ((mask & ~cache.mask & (MAY_READ | MAY_WRITE | MAY_EXEC)) == 0)
if ((mask & ~cache.mask & (MAY_READ | MAY_EXEC)) == 0)
return 0;

/* even though OPEN succeeded, access is denied. Close the file */
Expand Down

0 comments on commit 3ba699b

Please sign in to comment.