mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
nfs/blocklayout: remove cruft in bl_alloc_init_bio
bio_alloc never returns NULL when it can sleep. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Acked-by: Damien Le Moal <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
1 parent
e82ed3a4fb
commit
6808f7af96
1 file changed
-5
@@ -123,11 +123,6 @@ bl_alloc_init_bio(int npg, struct block_device *bdev, sector_t disk_sector,
|
||||
|
||||
npg = min(npg, BIO_MAX_PAGES);
|
||||
bio = bio_alloc(GFP_NOIO, npg);
|
||||
if (!bio && (current->flags & PF_MEMALLOC)) {
|
||||
while (!bio && (npg /= 2))
|
||||
bio = bio_alloc(GFP_NOIO, npg);
|
||||
}
|
||||
|
||||
if (bio) {
|
||||
bio->bi_iter.bi_sector = disk_sector;
|
||||
bio_set_dev(bio, bdev);
|
||||
|
||||
Reference in new issue
Block a user