mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Fix sa_legacy_attr_count to use ARRAY_SIZE
Replace magic value 16 with ARRAY_SIZE() to correctly handle when the sa_legacy_attrs array size changes. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: cao.xuewen <cao.xuewen@zte.com.cn> Closes #5354
This commit is contained in:
parent
981b21260e
commit
51c9163f98
@ -202,7 +202,7 @@ sa_attr_type_t sa_legacy_zpl_layout[] = {
|
||||
*/
|
||||
sa_attr_type_t sa_dummy_zpl_layout[] = { 0 };
|
||||
|
||||
static int sa_legacy_attr_count = 16;
|
||||
static int sa_legacy_attr_count = ARRAY_SIZE(sa_legacy_attrs);
|
||||
static kmem_cache_t *sa_cache = NULL;
|
||||
|
||||
/*ARGSUSED*/
|
||||
|
Loading…
Reference in New Issue
Block a user