nilfs2: remove cruft in nilfs_alloc_seg_bio
bio_alloc never returns NULL when it can sleep. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Acked-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
6808f7af96
commit
64820ac6c6
|
@ -386,10 +386,6 @@ static struct bio *nilfs_alloc_seg_bio(struct the_nilfs *nilfs, sector_t start,
|
||||||
struct bio *bio;
|
struct bio *bio;
|
||||||
|
|
||||||
bio = bio_alloc(GFP_NOIO, nr_vecs);
|
bio = bio_alloc(GFP_NOIO, nr_vecs);
|
||||||
if (bio == NULL) {
|
|
||||||
while (!bio && (nr_vecs >>= 1))
|
|
||||||
bio = bio_alloc(GFP_NOIO, nr_vecs);
|
|
||||||
}
|
|
||||||
if (likely(bio)) {
|
if (likely(bio)) {
|
||||||
bio_set_dev(bio, nilfs->ns_bdev);
|
bio_set_dev(bio, nilfs->ns_bdev);
|
||||||
bio->bi_iter.bi_sector =
|
bio->bi_iter.bi_sector =
|
||||||
|
|
Loading…
Reference in New Issue