mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user