Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp696618rwe; Thu, 1 Sep 2022 06:25:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR5vifo/2g+QtXwI1zni1xE/r0pPGKIFAcaYSJ0rXGBCHzKVa65MXaSuygi+Zhg/Mobnien0 X-Received: by 2002:a17:906:9b8b:b0:741:56d3:b8fc with SMTP id dd11-20020a1709069b8b00b0074156d3b8fcmr16730895ejc.337.1662038734792; Thu, 01 Sep 2022 06:25:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662038734; cv=none; d=google.com; s=arc-20160816; b=pSjHJs4N8fCnUerX9a5DES5qJP/ltfQ9pjpW34qgTKdlbyvs2pI6NmTNCCCzjfhR+K +cl5sUo7FpDyc7OrqZbHIB/lN9HSJaR4kgbQZC2dXymHIlRMvXxIJs9EXdmMU+gcfFHs mYfZbgwAqqks4S2o3UZYZMx0itDkzrJGAAiSQGJEzr/+cxGn1uVLJjMjceOs+nXxt8vf Yi//UwhydKdGaJcDKTefJ4UzqT1TevuiXaOW/qbrH7zZZyjZvr0zbO0rQxuensMCWvtz 274mJiOjmngF9ZNnyFpFjCr76wku+vjn/RH0qu3vVXLg4ehY1GF1zf+plvMq2yhuC/YQ bhTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=wytbr88iQXffofKjbzKvjmHIDWVRSmc3G5dRN41QWQ0=; b=ccP3LXkwk7lVpSmNfULKCaX1mT0buVzbbgtVwestuafo/aPwAOHxHYdlbgEFPG6jYt 1Kc0z39VzAMyITyt1swRUwhWBDvM8N7p7e622UE4dUBdiInnM6JBqoWHlvwXkcnjaHGc 0hl/OAMc4P7hxyHNJWhSlVHiSssBmmrVrS9MO+SsWFRVNY1ek8id4/S98gturbcpGqsL mWVq9ICjK1f8gCAphzg0qRw4k0ks2xffg0Cpf9xspXrXxNM76aBu+YxjOzViB9aIWMKD DrELDt1HoxLQzag17eYLOITt+BwkBIOQA/NyufBmPxMG1GwP6RYTRabYp77ZWVTyKypd ibCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p34-20020a056402502200b0044398d6220csi1823252eda.503.2022.09.01.06.25.09; Thu, 01 Sep 2022 06:25:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234205AbiIANYl (ORCPT + 99 others); Thu, 1 Sep 2022 09:24:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234176AbiIANYN (ORCPT ); Thu, 1 Sep 2022 09:24:13 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 918EE22BCA; Thu, 1 Sep 2022 06:24:04 -0700 (PDT) Received: from canpemm500005.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4MJM8T339yzYd5T; Thu, 1 Sep 2022 21:19:37 +0800 (CST) Received: from huawei.com (10.175.127.227) by canpemm500005.china.huawei.com (7.192.104.229) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Thu, 1 Sep 2022 21:24:01 +0800 From: Zhang Yi To: , , , , , , , CC: , , , , , , , , , , , , Subject: [PATCH v2 05/14] isofs: replace ll_rw_block() Date: Thu, 1 Sep 2022 21:34:56 +0800 Message-ID: <20220901133505.2510834-6-yi.zhang@huawei.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220901133505.2510834-1-yi.zhang@huawei.com> References: <20220901133505.2510834-1-yi.zhang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.127.227] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To canpemm500005.china.huawei.com (7.192.104.229) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org ll_rw_block() is not safe for the sync read path because it cannot guarantee that submitting read IO if the buffer has been locked. We could get false positive EIO return from zisofs_uncompress_block() if he buffer has been locked by others. So stop using ll_rw_block(), switch to sync helper instead. Signed-off-by: Zhang Yi Reviewed-by: Jan Kara --- fs/isofs/compress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c index b466172eec25..59b03d74ecbe 100644 --- a/fs/isofs/compress.c +++ b/fs/isofs/compress.c @@ -82,7 +82,7 @@ static loff_t zisofs_uncompress_block(struct inode *inode, loff_t block_start, return 0; } haveblocks = isofs_get_blocks(inode, blocknum, bhs, needblocks); - ll_rw_block(REQ_OP_READ, haveblocks, bhs); + bh_read_batch(haveblocks, bhs); curbh = 0; curpage = 0; -- 2.31.1