]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
block: remove bio_release_page
authorChristoph Hellwig <hch@lst.de>
Mon, 26 Jan 2026 05:53:36 +0000 (06:53 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 28 Jan 2026 12:16:39 +0000 (05:16 -0700)
Merge bio_release_page into the only remaining caller.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Tested-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
block/blk.h

index 530082c8cf0cffb85ad144199c1609a4500f6b69..285b573ae82f807ccb52f8d580bfde7cf9ddc7c2 100644 (file)
@@ -1195,7 +1195,9 @@ static int bio_iov_iter_align_down(struct bio *bio, struct iov_iter *iter,
                        break;
                }
 
-               bio_release_page(bio, bv->bv_page);
+               if (bio_flagged(bio, BIO_PAGE_PINNED))
+                       unpin_user_page(bv->bv_page);
+
                bio->bi_vcnt--;
                nbytes -= bv->bv_len;
        } while (nbytes);
index 980eef1f5690329a1d9e8d1db2775fac3f259d2f..886238cae5f1a2dc2af9fb711e70bd402a266167 100644 (file)
@@ -595,17 +595,6 @@ void bdev_set_nr_sectors(struct block_device *bdev, sector_t sectors);
 
 struct gendisk *__alloc_disk_node(struct request_queue *q, int node_id,
                struct lock_class_key *lkclass);
-
-/*
- * Clean up a page appropriately, where the page may be pinned, may have a
- * ref taken on it or neither.
- */
-static inline void bio_release_page(struct bio *bio, struct page *page)
-{
-       if (bio_flagged(bio, BIO_PAGE_PINNED))
-               unpin_user_page(page);
-}
-
 struct request_queue *blk_alloc_queue(struct queue_limits *lim, int node_id);
 
 int disk_scan_partitions(struct gendisk *disk, blk_mode_t mode);