From: Shida Zhang Date: Tue, 27 Jan 2026 08:21:11 +0000 (+0800) Subject: bcache: remove dead code in detached_dev_do_request X-Git-Tag: v6.19-rc8~14^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ea84d7a92cb0b30aaf7d2066a69e28e27932332;p=thirdparty%2Fkernel%2Flinux.git 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: Christoph Hellwig Signed-off-by: Shida Zhang Reviewed-by: Christoph Hellwig Signed-off-by: Jens Axboe --- diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c index a02aecac05cd..c2f38907a2a3 100644 --- a/drivers/md/bcache/request.c +++ b/drivers/md/bcache/request.c @@ -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 */