aoe: handle highmem pages
authorChristoph Hellwig <hch@lst.de>
Wed, 9 May 2018 13:59:46 +0000 (15:59 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 11 May 2018 21:08:00 +0000 (15:08 -0600)
Use kmap_atomic when copying out of a bio_vec.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/aoe/aoeblk.c
drivers/block/aoe/aoecmd.c

index 6797e6c..027b876 100644 (file)
@@ -388,7 +388,6 @@ aoeblk_gdalloc(void *vp)
                        d->aoemajor, d->aoeminor);
                goto err_mempool;
        }
-       blk_queue_bounce_limit(q, BLK_BOUNCE_HIGH);
 
        spin_lock_irqsave(&d->lock, flags);
        WARN_ON(!(d->flags & DEVFL_GD_NOW));
index 540bb60..096882e 100644 (file)
@@ -1032,8 +1032,9 @@ bvcpy(struct sk_buff *skb, struct bio *bio, struct bvec_iter iter, long cnt)
        iter.bi_size = cnt;
 
        __bio_for_each_segment(bv, bio, iter, iter) {
-               char *p = page_address(bv.bv_page) + bv.bv_offset;
+               char *p = kmap_atomic(bv.bv_page) + bv.bv_offset;
                skb_copy_bits(skb, soff, p, bv.bv_len);
+               kunmap_atomic(p);
                soff += bv.bv_len;
        }
 }