Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131520
b: refs/heads/master
c: a60e78e
h: refs/heads/master
v: v3
  • Loading branch information
Subhash Peddamallu authored and Jens Axboe committed Feb 18, 2009
1 parent 00dbe20 commit f1d7e5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 93dbb393503d53cd226e5e1f0088fe8f4dbaa2b8
refs/heads/master: a60e78e57a17d55bbd5a96da16fe9649d364b987
5 changes: 3 additions & 2 deletions trunk/fs/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,10 @@ void bio_init(struct bio *bio)
struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)
{
struct bio *bio = NULL;
void *p;

if (bs) {
void *p = mempool_alloc(bs->bio_pool, gfp_mask);
p = mempool_alloc(bs->bio_pool, gfp_mask);

if (p)
bio = p + bs->front_pad;
Expand All @@ -329,7 +330,7 @@ struct bio *bio_alloc_bioset(gfp_t gfp_mask, int nr_iovecs, struct bio_set *bs)
}
if (unlikely(!bvl)) {
if (bs)
mempool_free(bio, bs->bio_pool);
mempool_free(p, bs->bio_pool);
else
kfree(bio);
bio = NULL;
Expand Down

0 comments on commit f1d7e5a

Please sign in to comment.