scst_lib: Use gfp_mask instead of GFP_KERNEL for percpu_ref_init()

Fix smatch-reported warning message:

drivers/scst/scst_lib.c:4198 scst_alloc_device() warn: use 'gfp_mask'
here instead of GFP_KERNEL?
This commit is contained in:
Gleb Chesnokov
2024-01-10 11:12:12 +03:00
parent cc3833c50b
commit b5693922e0

View File

@@ -4223,7 +4223,7 @@ int scst_alloc_device(gfp_t gfp_mask, int nodeid, struct scst_device **out_dev)
memset(dev, 0, sizeof(*dev));
dev->handler = &scst_null_devtype;
res = percpu_ref_init(&dev->refcnt, scst_release_device, 0, GFP_KERNEL);
res = percpu_ref_init(&dev->refcnt, scst_release_device, 0, gfp_mask);
if (res < 0)
goto free_dev;
#ifdef CONFIG_SCST_PER_DEVICE_CMD_COUNT_LIMIT