提交 756d097b 编写于 作者: A Al Viro

dm-bufio: virt_to_phys() doesn't change remainder modulo PAGE_SIZE

... so virt_to_phys(p) & (PAGE_SIZE - 1) is a very odd way to
spell offset_in_page(p).
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 4e728cf8
......@@ -630,7 +630,7 @@ static void use_inline_bio(struct dm_buffer *b, int rw, sector_t block,
do {
if (!bio_add_page(&b->bio, virt_to_page(ptr),
len < PAGE_SIZE ? len : PAGE_SIZE,
virt_to_phys(ptr) & (PAGE_SIZE - 1))) {
offset_in_page(ptr))) {
BUG_ON(b->c->block_size <= PAGE_SIZE);
use_dmio(b, rw, block, end_io);
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册