diff options
author | Christoph Hellwig <hch@lst.de> | 2021-12-22 10:08:42 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-27 08:47:40 +0100 |
commit | 235b697f5f1fa0f20938fa64e88441b1cfeeca57 (patch) | |
tree | 014325a2f1666aee94d2a60f309503250d2ee4fe | |
parent | 0ba4af0351f15328aedba4d810e8312d24164581 (diff) | |
download | linux-stable-235b697f5f1fa0f20938fa64e88441b1cfeeca57.tar.gz linux-stable-235b697f5f1fa0f20938fa64e88441b1cfeeca57.tar.bz2 linux-stable-235b697f5f1fa0f20938fa64e88441b1cfeeca57.zip |
scsi: sr: Don't use GFP_DMA
[ Upstream commit d94d94969a4ba07a43d62429c60372320519c391 ]
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>
-rw-r--r-- | drivers/scsi/sr.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sr_vendor.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 9b63e46edffc..a2a4c6e22c68 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c @@ -882,7 +882,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; diff --git a/drivers/scsi/sr_vendor.c b/drivers/scsi/sr_vendor.c index 11a238cb2222..629bfe1b2026 100644 --- a/drivers/scsi/sr_vendor.c +++ b/drivers/scsi/sr_vendor.c @@ -118,7 +118,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; @@ -166,7 +166,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; |