Skip to content

Commit e4cc646

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: remove BIO_PAGE_REFFED
Now that all block direct I/O helpers use page pinning, this flag is unused. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Christian Brauner <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: David Howells <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 2e82f6c commit e4cc646

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

block/blk.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,8 +445,6 @@ static inline void bio_release_page(struct bio *bio, struct page *page)
445445
{
446446
if (bio_flagged(bio, BIO_PAGE_PINNED))
447447
unpin_user_page(page);
448-
else if (bio_flagged(bio, BIO_PAGE_REFFED))
449-
put_page(page);
450448
}
451449

452450
struct request_queue *blk_alloc_queue(int node_id);

include/linux/bio.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,7 @@ void zero_fill_bio(struct bio *bio);
492492

493493
static inline void bio_release_pages(struct bio *bio, bool mark_dirty)
494494
{
495-
if (bio_flagged(bio, BIO_PAGE_REFFED) ||
496-
bio_flagged(bio, BIO_PAGE_PINNED))
495+
if (bio_flagged(bio, BIO_PAGE_PINNED))
497496
__bio_release_pages(bio, mark_dirty);
498497
}
499498

include/linux/blk_types.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,6 @@ struct bio {
326326
*/
327327
enum {
328328
BIO_PAGE_PINNED, /* Unpin pages in bio_release_pages() */
329-
BIO_PAGE_REFFED, /* put pages in bio_release_pages() */
330329
BIO_CLONED, /* doesn't own data */
331330
BIO_BOUNCED, /* bio is a bounce bio */
332331
BIO_QUIET, /* Make BIO Quiet */

0 commit comments

Comments
 (0)