Commit 64820ac6 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

nilfs2: remove cruft in nilfs_alloc_seg_bio



bio_alloc never returns NULL when it can sleep.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Acked-by: default avatarDamien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 6808f7af
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -386,10 +386,6 @@ static struct bio *nilfs_alloc_seg_bio(struct the_nilfs *nilfs, sector_t start,
	struct bio *bio;

	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)) {
		bio_set_dev(bio, nilfs->ns_bdev);
		bio->bi_iter.bi_sector =