Return-Path: Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726739AbhAXKGR (ORCPT ); Sun, 24 Jan 2021 05:06:17 -0500 From: Christoph Hellwig Subject: [PATCH 02/10] dcssblk: remove the end of device check in dcssblk_submit_bio Date: Sun, 24 Jan 2021 11:02:33 +0100 Message-Id: <20210124100241.1167849-3-hch@lst.de> In-Reply-To: <20210124100241.1167849-1-hch@lst.de> References: <20210124100241.1167849-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-ID: To: Jens Axboe Cc: Tejun Heo , Coly Li , Song Liu , dm-devel@redhat.com, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, linux-s390@vger.kernel.org, linux-block@vger.kernel.org The block layer already checks for this conditions in bio_check_eod before calling the driver. Signed-off-by: Christoph Hellwig Acked-by: Tejun Heo --- drivers/s390/block/dcssblk.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index 299e77ec2c4163..5c5cff3f237452 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c @@ -886,10 +886,6 @@ dcssblk_submit_bio(struct bio *bio) (bio->bi_iter.bi_size & 4095) != 0) /* Request is not page-aligned. */ goto fail; - if (bio_end_sector(bio) > get_capacity(bio->bi_disk)) { - /* Request beyond end of DCSS segment. */ - goto fail; - } /* verify data transfer direction */ if (dev_info->is_shared) { switch (dev_info->segment_type) { -- 2.29.2