diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-09-28 11:37:56 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-10-10 18:04:45 -0400 |
commit | 6409a5a65d2b959c3f5e2b8adfa67c349e294652 (patch) | |
tree | 82a765fd44662f4c334d0e639aa2e86341b847ba /fs/nfsd/state.h | |
parent | 71c3bcd71393a9e67d5b77597a612537f89c30ed (diff) | |
download | talos-op-linux-6409a5a65d2b959c3f5e2b8adfa67c349e294652.tar.gz talos-op-linux-6409a5a65d2b959c3f5e2b8adfa67c349e294652.zip |
nfsd4: clean up downgrading code
In response to some review comments, get rid of the somewhat obscure
for-loop with bitops, and improve a comment.
Reported-by: Steve Dickson <steved@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/state.h')
-rw-r--r-- | fs/nfsd/state.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index 13f6f9f5ceec..22b065a55ea0 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h @@ -403,9 +403,11 @@ struct nfs4_file { /* One each for O_RDONLY, O_WRONLY, O_RDWR: */ struct file * fi_fds[3]; /* - * Each open or lock stateid contributes 1 to either - * fi_access[O_RDONLY], fi_access[O_WRONLY], or both, depending - * on open or lock mode: + * Each open or lock stateid contributes 0-4 to the counts + * below depending on which bits are set in st_access_bitmap: + * 1 to fi_access[O_RDONLY] if NFS4_SHARE_ACCES_READ is set + * + 1 to fi_access[O_WRONLY] if NFS4_SHARE_ACCESS_WRITE is set + * + 1 to both of the above if NFS4_SHARE_ACCESS_BOTH is set. */ atomic_t fi_access[2]; struct file *fi_deleg_file; |