]> git.proxmox.com Git - mirror_zfs.git/commit
Statically allocate first node of zfsdev_state_list
authorRichard Yao <richard.yao@alumni.stonybrook.edu>
Tue, 7 Feb 2023 08:23:45 +0000 (03:23 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 1 Mar 2023 01:31:41 +0000 (17:31 -0800)
commit9a14ce43c3d6a9939804215bbbe66de5115ace42
tree1466fc36374b7dfb81557c307a66449b2d48766b
parent7fc48f8378c608bde79e815f8a3e95a4f2045314
Statically allocate first node of zfsdev_state_list

This avoids a call to kmem_alloc() during module load. It also
suppresses a defect report from Clang's static analyzer that claims that
we will have a NULL pointer dereference in zfsdev_state_init() because
it does not understand that this has already been allocated in
zfs_kmod_init().

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14470
module/zfs/zfs_ioctl.c