Commit 6ea84d7a authored by Shida Zhang's avatar Shida Zhang Committed by Jens Axboe
Browse files

bcache: remove dead code in detached_dev_do_request



bio_alloc_clone() with GFP_NOIO and a mempool will not return NULL.
Remove the unnecessary NULL check.

Suggested-by: default avatarChristoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarShida Zhang <zhangshida@kylinos.cn>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 45614d8c
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -1113,11 +1113,6 @@ static void detached_dev_do_request(struct bcache_device *d,

	clone_bio = bio_alloc_clone(dc->bdev, orig_bio, GFP_NOIO,
				    &d->bio_detached);
	if (!clone_bio) {
		orig_bio->bi_status = BLK_STS_RESOURCE;
		bio_endio(orig_bio);
		return;
	}

	ddip = container_of(clone_bio, struct detached_dev_io_private, bio);
	/* Count on the bcache device */