From: Christoph Hellwig Date: Tue, 26 Jan 2021 14:52:46 +0000 (+0100) Subject: nilfs2: remove cruft in nilfs_alloc_seg_bio X-Git-Tag: accepted/tizen/unified/20230118.172025~7683^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=64820ac6c6962f76d164fa690deaa688d59278e2;p=platform%2Fkernel%2Flinux-rpi.git nilfs2: remove cruft in nilfs_alloc_seg_bio bio_alloc never returns NULL when it can sleep. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Reviewed-by: Chaitanya Kulkarni Acked-by: Damien Le Moal Signed-off-by: Jens Axboe --- diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c index 1a8729e..1e75417 100644 --- a/fs/nilfs2/segbuf.c +++ b/fs/nilfs2/segbuf.c @@ -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 =