Skip to content

Commit

Permalink
block: remove BIO_PAGE_REFFED
Browse files Browse the repository at this point in the history
Now that all block direct I/O helpers use page pinning, this flag is
unused.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/20230614140341.521331-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Jun 16, 2023
1 parent 2e82f6c commit e4cc646
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
2 changes: 0 additions & 2 deletions block/blk.h
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,6 @@ static inline void bio_release_page(struct bio *bio, struct page *page)
{
if (bio_flagged(bio, BIO_PAGE_PINNED))
unpin_user_page(page);
else if (bio_flagged(bio, BIO_PAGE_REFFED))
put_page(page);
}

struct request_queue *blk_alloc_queue(int node_id);
Expand Down
3 changes: 1 addition & 2 deletions include/linux/bio.h
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,7 @@ void zero_fill_bio(struct bio *bio);

static inline void bio_release_pages(struct bio *bio, bool mark_dirty)
{
if (bio_flagged(bio, BIO_PAGE_REFFED) ||
bio_flagged(bio, BIO_PAGE_PINNED))
if (bio_flagged(bio, BIO_PAGE_PINNED))
__bio_release_pages(bio, mark_dirty);
}

Expand Down
1 change: 0 additions & 1 deletion include/linux/blk_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ struct bio {
*/
enum {
BIO_PAGE_PINNED, /* Unpin pages in bio_release_pages() */
BIO_PAGE_REFFED, /* put pages in bio_release_pages() */
BIO_CLONED, /* doesn't own data */
BIO_BOUNCED, /* bio is a bounce bio */
BIO_QUIET, /* Make BIO Quiet */
Expand Down

0 comments on commit e4cc646

Please sign in to comment.