Skip to content

Commit

Permalink
block: remove the __bio_add_pc_page export
Browse files Browse the repository at this point in the history
The same page optimization is a rather odd corner case, which is not
used outside bio.c and which really should not be used outside of bio.c
either - we have better highlevel helpers like the rq/bio mapping
helpers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Apr 30, 2019
1 parent 2b070cf commit 4713839
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 1 addition & 2 deletions block/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ static bool can_add_page_to_seg(struct request_queue *q,
*
* This should only be used by passthrough bios.
*/
int __bio_add_pc_page(struct request_queue *q, struct bio *bio,
static int __bio_add_pc_page(struct request_queue *q, struct bio *bio,
struct page *page, unsigned int len, unsigned int offset,
bool put_same_page)
{
Expand Down Expand Up @@ -776,7 +776,6 @@ int __bio_add_pc_page(struct request_queue *q, struct bio *bio,
bio_set_flag(bio, BIO_SEG_VALID);
return len;
}
EXPORT_SYMBOL(__bio_add_pc_page);

int bio_add_pc_page(struct request_queue *q, struct bio *bio,
struct page *page, unsigned int len, unsigned int offset)
Expand Down
3 changes: 0 additions & 3 deletions include/linux/bio.h
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,6 @@ void bio_chain(struct bio *, struct bio *);
extern int bio_add_page(struct bio *, struct page *, unsigned int,unsigned int);
extern int bio_add_pc_page(struct request_queue *, struct bio *, struct page *,
unsigned int, unsigned int);
extern int __bio_add_pc_page(struct request_queue *, struct bio *,
struct page *, unsigned int, unsigned int,
bool);
bool __bio_try_merge_page(struct bio *bio, struct page *page,
unsigned int len, unsigned int off, bool same_page);
void __bio_add_page(struct bio *bio, struct page *page,
Expand Down

0 comments on commit 4713839

Please sign in to comment.