]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: shrink st_access_bmap and st_deny_bmap
authorJeff Layton <jlayton@primarydata.com>
Thu, 10 Jul 2014 18:07:30 +0000 (14:07 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 11 Jul 2014 15:06:04 +0000 (11:06 -0400)
commitc365b294e01edc5f2405d43eaf24897bb24b130c
treee3c6815571449201c7f780e50bb5d82854ac9c2c
parent0572f41b4f57d5888c4e0a964f204216018f65aa
nfsd: shrink st_access_bmap and st_deny_bmap

We never use anything above bit #3, so an unsigned long for each is
wasteful. Shrink them to a char each, and add some WARN_ON_ONCE calls if
we try to set or clear bits that would go outside those sizes.

Note too that because atomic bitops work on unsigned longs, we have to
abandon their use here. That shouldn't be a problem though since we
don't really care about the atomicity in this code anyway. Using them
was just a convenient way to flip bits.

Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c
fs/nfsd/state.h