mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 15:42:46 +00:00
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>
This commit is contained in:
parent
e82ed3a4fb
commit
6808f7af96
1 changed files with 0 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue