scatterlist: do not disable IRQs in sg_copy_buffer
Commit50bed2e286
("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 commit8290e2d2dc
("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: http://lkml.kernel.org/r/1486040150-14109-3-git-send-email-gilad@benyossef.com Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: <ofir.drang@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
1d5210ef70
commit
d317120097
|
@ -651,7 +651,6 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
|
||||||
{
|
{
|
||||||
unsigned int offset = 0;
|
unsigned int offset = 0;
|
||||||
struct sg_mapping_iter miter;
|
struct sg_mapping_iter miter;
|
||||||
unsigned long flags;
|
|
||||||
unsigned int sg_flags = SG_MITER_ATOMIC;
|
unsigned int sg_flags = SG_MITER_ATOMIC;
|
||||||
|
|
||||||
if (to_buffer)
|
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))
|
if (!sg_miter_skip(&miter, skip))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
local_irq_save(flags);
|
|
||||||
|
|
||||||
while ((offset < buflen) && sg_miter_next(&miter)) {
|
while ((offset < buflen) && sg_miter_next(&miter)) {
|
||||||
unsigned int len;
|
unsigned int len;
|
||||||
|
|
||||||
|
@ -681,7 +678,6 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf,
|
||||||
|
|
||||||
sg_miter_stop(&miter);
|
sg_miter_stop(&miter);
|
||||||
|
|
||||||
local_irq_restore(flags);
|
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(sg_copy_buffer);
|
EXPORT_SYMBOL(sg_copy_buffer);
|
||||||
|
|
Loading…
Reference in New Issue