提交 9c57dea2 编写于 作者: C Christoph Hellwig 提交者: Yongqiang Liu

scsi: sr: Don't use GFP_DMA

stable inclusion
from linux-4.19.226
commit b24ef0a4974a95c9ee1aade3f39b90fc30ac552d

--------------------------------

[ Upstream commit d94d9496 ]

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.deReported-by: NBaoquan He <bhe@redhat.com>
Reviewed-by: NBaoquan He <bhe@redhat.com>
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
Signed-off-by: NLaibin Qiu <qiulaibin@huawei.com>
Signed-off-by: NYongqiang Liu <liuyongqiang13@huawei.com>
上级 643b11a3
......@@ -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;
......
......@@ -119,7 +119,7 @@ int sr_set_blocklength(Scsi_CD *cd, int blocklength)
density = (blocklength > 2048) ? 0x81 : 0x83;
#endif
buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
buffer = kmalloc(512, GFP_KERNEL);
if (!buffer)
return -ENOMEM;
......@@ -167,7 +167,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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册