diff mbox series

[1/2] block: remove bio_add_hw_folio

Message ID 20241105155235.460088-2-hch@lst.de (mailing list archive)
State New
Headers show
Series [1/2] block: remove bio_add_hw_folio | expand

Commit Message

Christoph Hellwig Nov. 5, 2024, 3:52 p.m. UTC
The only user of bio_add_hw_folio was removed in commit cafd00d0e909
("block: remove zone append special casing from the direct I/O path"),
so remove it as well.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/bio.c | 23 -----------------------
 block/blk.h |  4 ----
 2 files changed, 27 deletions(-)

Comments

Kundan Kumar Nov. 6, 2024, 9:54 a.m. UTC | #1
On 05/11/24 04:52PM, Christoph Hellwig wrote:
>The only user of bio_add_hw_folio was removed in commit cafd00d0e909
>("block: remove zone append special casing from the direct I/O path"),
>so remove it as well.
>
>Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Kundan Kumar <kundan.kumar@samsung.com>
diff mbox series

Patch

diff --git a/block/bio.c b/block/bio.c
index daceb0a5c1d7..1f6ac44b4881 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1017,29 +1017,6 @@  int bio_add_hw_page(struct request_queue *q, struct bio *bio,
 	return len;
 }
 
-/**
- * bio_add_hw_folio - attempt to add a folio to a bio with hw constraints
- * @q: the target queue
- * @bio: destination bio
- * @folio: folio to add
- * @len: vec entry length
- * @offset: vec entry offset in the folio
- * @max_sectors: maximum number of sectors that can be added
- * @same_page: return if the segment has been merged inside the same folio
- *
- * Add a folio to a bio while respecting the hardware max_sectors, max_segment
- * and gap limitations.
- */
-int bio_add_hw_folio(struct request_queue *q, struct bio *bio,
-		struct folio *folio, size_t len, size_t offset,
-		unsigned int max_sectors, bool *same_page)
-{
-	if (len > UINT_MAX || offset > UINT_MAX)
-		return 0;
-	return bio_add_hw_page(q, bio, folio_page(folio, 0), len, offset,
-			       max_sectors, same_page);
-}
-
 /**
  * bio_add_pc_page	- attempt to add page to passthrough bio
  * @q: the target queue
diff --git a/block/blk.h b/block/blk.h
index 63d5df0dc29c..837a57ed1911 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -569,10 +569,6 @@  int bio_add_hw_page(struct request_queue *q, struct bio *bio,
 		struct page *page, unsigned int len, unsigned int offset,
 		unsigned int max_sectors, bool *same_page);
 
-int bio_add_hw_folio(struct request_queue *q, struct bio *bio,
-		struct folio *folio, size_t len, size_t offset,
-		unsigned int max_sectors, bool *same_page);
-
 /*
  * Clean up a page appropriately, where the page may be pinned, may have a
  * ref taken on it or neither.