Commit 37a5b5c6 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

jsflash: handle highmem pages

Just kmap the bio single page payload before processing it.

(and yes, now highmem on sparc32 anyway, but kmap_(un)map atomic are nops,
so this gives the right example)
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent ad180f6f
...@@ -215,6 +215,7 @@ static void jsfd_request(void) ...@@ -215,6 +215,7 @@ static void jsfd_request(void)
unsigned long offset = blk_rq_pos(req) << 9; unsigned long offset = blk_rq_pos(req) << 9;
size_t len = blk_rq_cur_bytes(req); size_t len = blk_rq_cur_bytes(req);
blk_status_t err = BLK_STS_IOERR; blk_status_t err = BLK_STS_IOERR;
void *p;
if ((offset + len) > jdp->dsize) if ((offset + len) > jdp->dsize)
goto end; goto end;
...@@ -229,7 +230,9 @@ static void jsfd_request(void) ...@@ -229,7 +230,9 @@ static void jsfd_request(void)
goto end; goto end;
} }
jsfd_read(bio_data(req->bio), jdp->dbase + offset, len); p = kmap_atomic(bio_page(bio)) + bio_offset(bio);
jsfd_read(p, jdp->dbase + offset, len);
kunmap_atomic(p);
err = BLK_STS_OK; err = BLK_STS_OK;
end: end:
if (!__blk_end_request_cur(req, err)) if (!__blk_end_request_cur(req, err))
...@@ -592,7 +595,6 @@ static int jsfd_init(void) ...@@ -592,7 +595,6 @@ static int jsfd_init(void)
put_disk(disk); put_disk(disk);
goto out; goto out;
} }
blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
jsfd_disk[i] = disk; jsfd_disk[i] = disk;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment