Skip to content

Commit

Permalink
block: don't disable interrupts during kmap_atomic()
Browse files Browse the repository at this point in the history
bounce_copy_vec() disables interrupts around kmap_atomic(). This is a
leftover from the old kmap_atomic() implementation which relied on fixed
mapping slots, so the caller had to make sure that the same slot could not
be reused from an interrupting context.

kmap_atomic() was changed to dynamic slots long ago and commit 1ec9c5d
("include/linux/highmem.h: remove the second argument of k[un]map_atomic()")
removed the slot assignements, but the callers were not checked for now
redundant interrupt disabling.

Remove the conditional interrupt disable.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Sebastian Andrzej Siewior authored and axboe committed May 7, 2018
1 parent f142f08 commit f3a1075
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions block/bounce.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,11 @@ __initcall(init_emergency_pool);
*/
static void bounce_copy_vec(struct bio_vec *to, unsigned char *vfrom)
{
unsigned long flags;
unsigned char *vto;

local_irq_save(flags);
vto = kmap_atomic(to->bv_page);
memcpy(vto + to->bv_offset, vfrom, to->bv_len);
kunmap_atomic(vto);
local_irq_restore(flags);
}

#else /* CONFIG_HIGHMEM */
Expand Down

0 comments on commit f3a1075

Please sign in to comment.