diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-02 12:45:27 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-04 10:29:07 -0500 |
commit | 756d097b959aefe69a081496f84cfc14b1397a15 (patch) | |
tree | 891919065990fecf3561452c6bce944170278eb7 | |
parent | 4e728cf8ffa2891913dd48e179c132fb9fa07e0e (diff) |
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: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | drivers/md/dm-bufio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index 2dd33085b331..adeb8d0f8aad 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c | |||
@@ -630,7 +630,7 @@ static void use_inline_bio(struct dm_buffer *b, int rw, sector_t block, | |||
630 | do { | 630 | do { |
631 | if (!bio_add_page(&b->bio, virt_to_page(ptr), | 631 | if (!bio_add_page(&b->bio, virt_to_page(ptr), |
632 | len < PAGE_SIZE ? len : PAGE_SIZE, | 632 | len < PAGE_SIZE ? len : PAGE_SIZE, |
633 | virt_to_phys(ptr) & (PAGE_SIZE - 1))) { | 633 | offset_in_page(ptr))) { |
634 | BUG_ON(b->c->block_size <= PAGE_SIZE); | 634 | BUG_ON(b->c->block_size <= PAGE_SIZE); |
635 | use_dmio(b, rw, block, end_io); | 635 | use_dmio(b, rw, block, end_io); |
636 | return; | 636 | return; |