]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
scsi: use short driver name for per-driver cmd slab caches
authorJames Bottomley <JBottomley@Parallels.com>
Sat, 26 Jul 2014 16:21:26 +0000 (12:21 -0400)
committerChristoph Hellwig <hch@lst.de>
Tue, 29 Jul 2014 12:28:04 +0000 (08:28 -0400)
hostt->name might contain space, so use the ->proc_name short name instead
when creating per-driver command slabs.

Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Reported-by: poma <pomidorabelisima@gmail.com>
Tested-by: poma <pomidorabelisima@gmail.com>
Reviewed-by: Vladimir Davydov <vdavydov@parallels.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/scsi.c

index 33318f5ebb4b781cbe7c3db22af09ad2039edb27..df3306019a7eeaf2009411ba0328dc7450fc6034 100644 (file)
@@ -365,8 +365,8 @@ scsi_alloc_host_cmd_pool(struct Scsi_Host *shost)
        if (!pool)
                return NULL;
 
-       pool->cmd_name = kasprintf(GFP_KERNEL, "%s_cmd", hostt->name);
-       pool->sense_name = kasprintf(GFP_KERNEL, "%s_sense", hostt->name);
+       pool->cmd_name = kasprintf(GFP_KERNEL, "%s_cmd", hostt->proc_name);
+       pool->sense_name = kasprintf(GFP_KERNEL, "%s_sense", hostt->proc_name);
        if (!pool->cmd_name || !pool->sense_name) {
                scsi_free_host_cmd_pool(pool);
                return NULL;