block: add BIO_HOLD_PAGES flag
authorJens Axboe <axboe@kernel.dk>
Fri, 30 Nov 2018 15:47:03 +0000 (08:47 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Dec 2018 17:13:09 +0000 (10:13 -0700)
commita5183b6beba1f4dbc71ebddb54ba606c80e64602
tree59c6202ba9479f7673a2897d4dd5ae74cc7fd745
parentb1a656e0df096b97e6267bab8a661fafdaf4f97f
block: add BIO_HOLD_PAGES flag

For user mapped IO, we do get_user_pages() upfront, and then do a
put_page() on each page at end_io time to release the page reference. In
preparation for having permanently mapped pages, add a BIO_HOLD_PAGES
flag that tells us not to release the pages, the caller will do that.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
include/linux/blk_types.h