Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82445
b: refs/heads/master
c: 8838dc4
h: refs/heads/master
i:
  82443: 84f7291
v: v3
  • Loading branch information
J. Bruce Fields committed Feb 1, 2008
1 parent 8e2652f commit 913daf1
Show file tree
Hide file tree
Showing 2 changed files with 10 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: b39c18fce003bb2d5a51a4734d8fdd2c81fa1a78
refs/heads/master: 8838dc43d6544570e8969a74ddc4a0d21abffde6
13 changes: 9 additions & 4 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,14 +1157,19 @@ find_file(struct inode *ino)
return NULL;
}

static int access_valid(u32 x)
static inline int access_valid(u32 x)
{
return (x > 0 && x < 4);
if (x < NFS4_SHARE_ACCESS_READ)
return 0;
if (x > NFS4_SHARE_ACCESS_BOTH)
return 0;
return 1;
}

static int deny_valid(u32 x)
static inline int deny_valid(u32 x)
{
return (x >= 0 && x < 5);
/* Note: unlike access bits, deny bits may be zero. */
return x <= NFS4_SHARE_DENY_BOTH;
}

static void
Expand Down

0 comments on commit 913daf1

Please sign in to comment.