提交 ce1e5181 编写于 作者: S Sebastian Andrzej Siewior 提交者: David S. Miller

ide: don't disable interrupts during kmap_atomic()

ide_pio_bytes() 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 1ec9c5dd
("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: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 56f0ddad
......@@ -237,7 +237,6 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
while (len) {
unsigned nr_bytes = min(len, cursg->length - cmd->cursg_ofs);
int page_is_high;
page = sg_page(cursg);
offset = cursg->offset + cmd->cursg_ofs;
......@@ -248,10 +247,6 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
nr_bytes = min_t(unsigned, nr_bytes, (PAGE_SIZE - offset));
page_is_high = PageHighMem(page);
if (page_is_high)
local_irq_save(flags);
buf = kmap_atomic(page) + offset;
cmd->nleft -= nr_bytes;
......@@ -270,9 +265,6 @@ void ide_pio_bytes(ide_drive_t *drive, struct ide_cmd *cmd,
kunmap_atomic(buf);
if (page_is_high)
local_irq_restore(flags);
len -= nr_bytes;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册