diff options
author | Christoph Hellwig <hch@lst.de> | 2021-01-26 15:52:45 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-01-27 09:51:48 -0700 |
commit | 6808f7af964be4ed6b04d2aa4ba884a2e47c6214 (patch) | |
tree | 463aa23d03cced7973c778a0f52c928ce9a44446 /fs/nfs/blocklayout | |
parent | e82ed3a4fbb54b2d7dcb2a7733520f3e10b97abf (diff) | |
download | linux-next-6808f7af964be4ed6b04d2aa4ba884a2e47c6214.tar.gz |
nfs/blocklayout: remove cruft in bl_alloc_init_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>
Diffstat (limited to 'fs/nfs/blocklayout')
-rw-r--r-- | fs/nfs/blocklayout/blocklayout.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c index 3be6836074ae..1a96ce28efb0 100644 --- a/fs/nfs/blocklayout/blocklayout.c +++ b/fs/nfs/blocklayout/blocklayout.c @@ -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); |