aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/bio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r--include/linux/bio.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 04944c91fae..fbe35b17555 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -212,11 +212,21 @@ extern void bio_pair_release(struct bio_pair *dbio);
212extern struct bio_set *bioset_create(unsigned int, unsigned int); 212extern struct bio_set *bioset_create(unsigned int, unsigned int);
213extern void bioset_free(struct bio_set *); 213extern void bioset_free(struct bio_set *);
214 214
215extern struct bio *bio_alloc(gfp_t, unsigned int);
216extern struct bio *bio_kmalloc(gfp_t, unsigned int);
217extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *); 215extern struct bio *bio_alloc_bioset(gfp_t, int, struct bio_set *);
218extern void bio_put(struct bio *); 216extern void bio_put(struct bio *);
219 217
218extern struct bio_set *fs_bio_set;
219
220static inline struct bio *bio_alloc(gfp_t gfp_mask, unsigned int nr_iovecs)
221{
222 return bio_alloc_bioset(gfp_mask, nr_iovecs, fs_bio_set);
223}
224
225static inline struct bio *bio_kmalloc(gfp_t gfp_mask, unsigned int nr_iovecs)
226{
227 return bio_alloc_bioset(gfp_mask, nr_iovecs, NULL);
228}
229
220extern void bio_endio(struct bio *, int); 230extern void bio_endio(struct bio *, int);
221struct request_queue; 231struct request_queue;
222extern int bio_phys_segments(struct request_queue *, struct bio *); 232extern int bio_phys_segments(struct request_queue *, struct bio *);
@@ -304,8 +314,6 @@ struct biovec_slab {
304 struct kmem_cache *slab; 314 struct kmem_cache *slab;
305}; 315};
306 316
307extern struct bio_set *fs_bio_set;
308
309/* 317/*
310 * a small number of entries is fine, not going to be performance critical. 318 * a small number of entries is fine, not going to be performance critical.
311 * basically we just need to survive 319 * basically we just need to survive