From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66DCBC83019 for ; Tue, 1 Dec 2020 16:55:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 311B02076C for ; Tue, 1 Dec 2020 16:55:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="MEEeMs+I" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391990AbgLAQzR (ORCPT ); Tue, 1 Dec 2020 11:55:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390685AbgLAQzP (ORCPT ); Tue, 1 Dec 2020 11:55:15 -0500 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90151C0617A6; Tue, 1 Dec 2020 08:54:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=IVAiR/5EBbH9VxN9lxbQLCTkk81ZOuRFYA9YZtOf8x4=; b=MEEeMs+IN9pux7xZMfswtKb/lc ynLY06460gePuqWvpWslMSJ/yrHuBTYTFx3TrLjpHq4ddp/sWzp+T1TUcVQlpEy/QPrIHMv7WOrIO nZRGl5RXd24KXaBhAHfkr0F7LzvXlFuuv91HSG3c0bIEvEtzMWmbsRGO1ZdMWFD4TOX1gcyFihtck nrV0cSiYwwXvxHmwwGo+mbYqkXz3/TXz3BkWLZBuV5er/4h2TYiBbREubCBy8AamDQHpSwHWwWefy KaKIdA/THuw0ASwg2bwu05OfOwktwFFKgx3QR+RJo7vkWmkzAqhFeVEmNuaGsmcxAVKixgnSFiecO f8Rqfh4A==; Received: from [2001:4bb8:184:6389:bbd8:a1c2:99e0:f58a] (helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kk8v6-0005Z2-1u; Tue, 01 Dec 2020 16:54:28 +0000 From: Christoph Hellwig 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 Subject: [PATCH 2/9] dcssblk: remove the end of device check in brd_do_bvec Date: Tue, 1 Dec 2020 17:54:17 +0100 Message-Id: <20201201165424.2030647-3-hch@lst.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201165424.2030647-1-hch@lst.de> References: <20201201165424.2030647-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-bcache@vger.kernel.org The block layer already checks for this conditions in bio_check_eod before calling the driver. Signed-off-by: Christoph Hellwig --- 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