diff options
author | cao <[email protected]> | 2016-11-03 01:26:12 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-11-02 10:26:12 -0700 |
commit | 51c9163f98f60f585906a2ddec376924ad142f78 (patch) | |
tree | e9d0e9865fb7b7a8753d47b9e8a9ec44f05881aa /module | |
parent | 981b21260e7ad35b59cee2989477276109b6b3a2 (diff) |
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 <[email protected]>
Signed-off-by: cao.xuewen <[email protected]>
Closes #5354
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/sa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/sa.c b/module/zfs/sa.c index 1548c5634..0df3b4755 100644 --- a/module/zfs/sa.c +++ b/module/zfs/sa.c @@ -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*/ |