mirror of https://gitee.com/openkylin/linux.git
[SCSI] tgt: use KMEM_CACHE macro
This uses new KMEM_CACHE() macro instead of kmem_cache_create directly to simplify slab cache creation. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
parent
423eef6fbb
commit
b312bab3b9
|
@ -621,9 +621,7 @@ static int __init scsi_tgt_init(void)
|
|||
{
|
||||
int err;
|
||||
|
||||
scsi_tgt_cmd_cache = kmem_cache_create("scsi_tgt_cmd",
|
||||
sizeof(struct scsi_tgt_cmd),
|
||||
0, 0, NULL);
|
||||
scsi_tgt_cmd_cache = KMEM_CACHE(scsi_tgt_cmd, 0);
|
||||
if (!scsi_tgt_cmd_cache)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
Loading…
Reference in New Issue