]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: use better definition of number of compression type
authorChengguang Xu <cgxu519@mykernel.net>
Thu, 10 Oct 2019 07:59:57 +0000 (15:59 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 18 Nov 2019 11:46:55 +0000 (12:46 +0100)
commit4c93ce0c2bed149dbd40ff7bd623a55c6f0dace7
tree653bc44cc799199b3d61d161689b320ae41b9858
parent221277631b0231f5b33fa1391f67f2b56b84de7a
btrfs: use better definition of number of compression type

The compression type upper limit constant is the same as the last value
and this is confusing.  In order to keep coding style consistent, use
BTRFS_NR_COMPRESS_TYPES as the total number that follows the idom of
'NR' being one more than the last value.

Signed-off-by: Chengguang Xu <cgxu519@mykernel.net>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c
fs/btrfs/compression.h
fs/btrfs/ioctl.c
fs/btrfs/tree-checker.c