mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
scsi: sr: Don't use GFP_DMA
[ Upstream commit d94d94969a
]
The allocated buffers are used as a command payload, for which the block
layer and/or DMA API do the proper bounce buffering if needed.
Link: https://lore.kernel.org/r/20211222090842.920724-1-hch@lst.de
Reported-by: Baoquan He <bhe@redhat.com>
Reviewed-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
0734d421e0
commit
b24ef0a497
2 changed files with 3 additions and 3 deletions
|
@ -885,7 +885,7 @@ static void get_capabilities(struct scsi_cd *cd)
|
|||
|
||||
|
||||
/* allocate transfer buffer */
|
||||
buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
|
||||
buffer = kmalloc(512, GFP_KERNEL);
|
||||
if (!buffer) {
|
||||
sr_printk(KERN_ERR, cd, "out of memory.\n");
|
||||
return;
|
||||
|
|
|
@ -113,7 +113,7 @@ int sr_set_blocklength(Scsi_CD *cd, int blocklength)
|
|||
if (cd->vendor == VENDOR_TOSHIBA)
|
||||
density = (blocklength > 2048) ? 0x81 : 0x83;
|
||||
|
||||
buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
|
||||
buffer = kmalloc(512, GFP_KERNEL);
|
||||
if (!buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
|
@ -161,7 +161,7 @@ int sr_cd_check(struct cdrom_device_info *cdi)
|
|||
if (cd->cdi.mask & CDC_MULTI_SESSION)
|
||||
return 0;
|
||||
|
||||
buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
|
||||
buffer = kmalloc(512, GFP_KERNEL);
|
||||
if (!buffer)
|
||||
return -ENOMEM;
|
||||
|
||||
|
|
Loading…
Reference in a new issue