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)
commitc11c591fe6682e0d642bf9242e53554a50e5fbc0
treee3c6815571449201c7f780e50bb5d82854ac9c2c
parent6d338b51eb6e37b4d6f1459c892f5ec7df0dad88
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