Skip to content

Commit

Permalink
block: Remove code handling bio_alloc failure with __GFP_WAIT
Browse files Browse the repository at this point in the history
Remove code handling bio_alloc failure with __GFP_WAIT.
GFP_KERNEL implies __GFP_WAIT.

Signed-off-by: Nikanth Karthikesan <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Nikanth Karthikesan authored and Jens Axboe committed Apr 15, 2009
1 parent 86c824b commit 15afd1c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions block/blk-barrier.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,6 @@ int blkdev_issue_flush(struct block_device *bdev, sector_t *error_sector)
return -ENXIO;

bio = bio_alloc(GFP_KERNEL, 0);
if (!bio)
return -ENOMEM;

bio->bi_end_io = bio_end_empty_barrier;
bio->bi_private = &wait;
bio->bi_bdev = bdev;
Expand Down
2 changes: 0 additions & 2 deletions block/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ static int blk_ioctl_discard(struct block_device *bdev, uint64_t start,
struct bio *bio;

bio = bio_alloc(GFP_KERNEL, 0);
if (!bio)
return -ENOMEM;

bio->bi_end_io = blk_ioc_discard_endio;
bio->bi_bdev = bdev;
Expand Down

0 comments on commit 15afd1c

Please sign in to comment.