diff options
author | Gilad Ben-Yossef <gilad@benyossef.com> | 2017-02-08 10:28:25 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2017-02-09 07:39:11 +1100 |
commit | 0cbe42d9fadb4e29daa00a86d7030488d9469912 (patch) | |
tree | f42827ccb82c3e7d1544e4383b101d47412093e8 /lib/scatterlist.c | |
parent | 8a3833ef605c2acd15fae35b4bca351cf1fd9f05 (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: 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>
Diffstat (limited to 'lib/scatterlist.c')
-rw-r--r-- | lib/scatterlist.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/lib/scatterlist.c b/lib/scatterlist.c index cc4d1a2d6bf3..77df28b21597 100644 --- a/lib/scatterlist.c +++ b/lib/scatterlist.c @@ -665,7 +665,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) @@ -678,8 +677,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; @@ -695,7 +692,6 @@ size_t sg_copy_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, sg_miter_stop(&miter); - local_irq_restore(flags); return offset; } EXPORT_SYMBOL(sg_copy_buffer); |