diff options
| author | Christoph Hellwig <hch@lst.de> | 2026-03-16 19:11:29 +0300 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-03-18 04:27:14 +0300 |
| commit | fed406f3c1c2feb97adcbc557218713c5f7ec6a7 (patch) | |
| tree | 0a31a65657ccb2b5185e156ad0ced757ca4857af | |
| parent | 5d540162059598c3f79e12f96064825cc91f0f9c (diff) | |
| download | linux-fed406f3c1c2feb97adcbc557218713c5f7ec6a7.tar.xz | |
block: mark bvec_{alloc,free} static
Only used in bio.c these days.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> -ck
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://patch.msgid.link/20260316161144.1607877-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
| -rw-r--r-- | block/bio.c | 7 | ||||
| -rw-r--r-- | block/blk.h | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/block/bio.c b/block/bio.c index bf1f3670e85a..6131ccb7284a 100644 --- a/block/bio.c +++ b/block/bio.c @@ -34,6 +34,8 @@ struct bio_alloc_cache { unsigned int nr_irq; }; +#define BIO_INLINE_VECS 4 + static struct biovec_slab { int nr_vecs; char *name; @@ -159,7 +161,8 @@ out: mutex_unlock(&bio_slab_lock); } -void bvec_free(mempool_t *pool, struct bio_vec *bv, unsigned short nr_vecs) +static void bvec_free(struct mempool *pool, struct bio_vec *bv, + unsigned short nr_vecs) { BUG_ON(nr_vecs > BIO_MAX_VECS); @@ -179,7 +182,7 @@ static inline gfp_t bvec_alloc_gfp(gfp_t gfp) __GFP_NOMEMALLOC | __GFP_NORETRY | __GFP_NOWARN; } -struct bio_vec *bvec_alloc(mempool_t *pool, unsigned short *nr_vecs, +static struct bio_vec *bvec_alloc(struct mempool *pool, unsigned short *nr_vecs, gfp_t gfp_mask) { struct biovec_slab *bvs = biovec_slab(*nr_vecs); diff --git a/block/blk.h b/block/blk.h index c5b2115b9ea4..103cb1d0b9cb 100644 --- a/block/blk.h +++ b/block/blk.h @@ -108,11 +108,6 @@ static inline void blk_wait_io(struct completion *done) struct block_device *blkdev_get_no_open(dev_t dev, bool autoload); void blkdev_put_no_open(struct block_device *bdev); -#define BIO_INLINE_VECS 4 -struct bio_vec *bvec_alloc(mempool_t *pool, unsigned short *nr_vecs, - gfp_t gfp_mask); -void bvec_free(mempool_t *pool, struct bio_vec *bv, unsigned short nr_vecs); - bool bvec_try_merge_hw_page(struct request_queue *q, struct bio_vec *bv, struct page *page, unsigned len, unsigned offset); |
