Skip to content

Commit 6ea84d7

Browse files
Shida Zhangaxboe
authored andcommitted
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 <hch@infradead.org> Signed-off-by: Shida Zhang <zhangshida@kylinos.cn> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 45614d8 commit 6ea84d7

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

drivers/md/bcache/request.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,11 +1113,6 @@ static void detached_dev_do_request(struct bcache_device *d,
11131113

11141114
clone_bio = bio_alloc_clone(dc->bdev, orig_bio, GFP_NOIO,
11151115
&d->bio_detached);
1116-
if (!clone_bio) {
1117-
orig_bio->bi_status = BLK_STS_RESOURCE;
1118-
bio_endio(orig_bio);
1119-
return;
1120-
}
11211116

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

0 commit comments

Comments
 (0)