path: root/lib
diff options
authorGilad Ben-Yossef <>2017-02-27 14:28:29 -0800
committerLinus Torvalds <>2017-02-27 18:43:46 -0800
commitd31712009709774506e536a3cc1f7c512f550a0c (patch)
tree585ef4a193d63365b9108e414afe146665559988 /lib
parent1d5210ef706523529d3cc16fd70be0a466253466 (diff)
scatterlist: do not disable IRQs in sg_copy_buffer
Commit 50bed2e2862a ("sg: disable interrupts inside sg_copy_buffer") introduced disabling interrupts in sg_copy_buffer() since atomic uses of miter required it due to use of kmap_atomic(). However, as commit 8290e2d2dcbf ("scatterlist: atomic sg_mapping_iter() no longer needs disabled IRQs") acknowledges disabling interrupts is no longer needed for calls to kmap_atomic() and therefore unneeded for miter ops either, so remove it from sg_copy_buffer(). Link: Signed-off-by: Gilad Ben-Yossef <> Cc: Jens Axboe <> Cc: <> Signed-off-by: Andrew Morton <> Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'lib')
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/scatterlist.c b/lib/scatterlist.c
index 393920fddcb9..c6cf82242d65 100644
--- a/lib/scatterlist.c
+++ b/lib/scatterlist.c
@@ -651,7 +651,6 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
unsigned int offset = 0;
struct sg_mapping_iter miter;
- unsigned long flags;
unsigned int sg_flags = SG_MITER_ATOMIC;
if (to_buffer)
@@ -664,8 +663,6 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
if (!sg_miter_skip(&miter, skip))
return false;
- local_irq_save(flags);
while ((offset < buflen) && sg_miter_next(&miter)) {
unsigned int len;
@@ -681,7 +678,6 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
- local_irq_restore(flags);
return offset;