Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp378446rwe; Wed, 31 Aug 2022 04:33:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR42GLL7mqUBOAYQcDKCfPW/caBoimbyrOLVUi707ntdzGhFSjKhPWB94tPHkIzDuMb3TuIo X-Received: by 2002:a17:907:868d:b0:730:f0ba:6328 with SMTP id qa13-20020a170907868d00b00730f0ba6328mr20427515ejc.444.1661945612721; Wed, 31 Aug 2022 04:33:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661945612; cv=none; d=google.com; s=arc-20160816; b=AP27yIPlQqF/i4TKKSCCA6b964XPNI/3aKQ0S+xH4TzIJQ6RvRN4cuD0CDKdg7VdKI 2f79qA5A4+7cIu3XdjoolD4qXk8pOwDjvK3h1kUMYhckQfaJJO66Shwshrtq1LHHktG6 5+eW7qI6A8lp2ZPfjjZ7ioS8R+3Cjp/kCWJezzQ/FxgAxZqhYTCu6sKGkdSwf6HB/DLk vu4yEizfhSE1sXajATc2r9sJep/59vTsRapdPpPpVztQOR+CcRw3aAm/8AkAuH8A7/JM hRgnsr3dp4YxdfJIihytsDUxUWywOdcH4b3+fSSRVxrLCJz+mar5WR6qJaxFPcOQCVA3 FePw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=oXzaBEvTVV7dbi9myeynRQQFCXVdxVJKtZqX81xMy8k=; b=lez83kJ308PPtFD8qMWOx2RAASAuib8NxMRvAWh2ixD8sdzfx4dqwlXdKJwGa1g0nL c8i4B5LGXlM+LnM+DNV85OErXIBuv5TY1e9zGPteNIeqFJYdl+XBtiioK8lzq4D9m/gR 1TfUlKRbiWMOZcMSQyL2GKtjesDIbjqa094lLmjqsdUrOvzoyqonArTd3LJ8R2/1GVAB FbydgT0EmE+5GILGBF1DCzJz/XOSG8GNM5VPVx0BgVwgD75B/AcS7kn1O4nQCH1nvz/p 92PANYTBdUPSQ1mSNC1mQwnBsaBDSLyTuHOf26Bh0D9IYTjl8SGDE32fAgsJh9COXe15 Oe2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=mPbi7U2q; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=+8l5+Kxj; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hv10-20020a17090760ca00b007123952b00dsi11086893ejc.100.2022.08.31.04.33.02; Wed, 31 Aug 2022 04:33:32 -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; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=mPbi7U2q; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=+8l5+Kxj; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230436AbiHaLPz (ORCPT + 99 others); Wed, 31 Aug 2022 07:15:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229655AbiHaLPy (ORCPT ); Wed, 31 Aug 2022 07:15:54 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B39F0883D3; Wed, 31 Aug 2022 04:15:53 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id D059A1F924; Wed, 31 Aug 2022 11:15:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1661944551; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oXzaBEvTVV7dbi9myeynRQQFCXVdxVJKtZqX81xMy8k=; b=mPbi7U2qKIanPKYVB8sPf2stChvWwJ1COvVr00O/9AJRZvghUomaQbB0KyXkUy4pMnVLKr w/6h+8ghNadTMJGE7oK3ErbM4mfCpj2CGsMQK4AHXb36lCPabynaouGuZ/Z5Agk4IDg2j4 pSdrP2QZlF517bgBQJnIFu8gpi74cQg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1661944551; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=oXzaBEvTVV7dbi9myeynRQQFCXVdxVJKtZqX81xMy8k=; b=+8l5+Kxjd5pNwOzZL5ohw7iQDKbEQCrFZuuYixoYezrMKq3W4lXTV40FstJ3qPyZO5S3mg Ln5047YJolJZx8Dg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id AF37013A7C; Wed, 31 Aug 2022 11:15:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id oOq5KudCD2NueAAAMHmgww (envelope-from ); Wed, 31 Aug 2022 11:15:51 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 2254CA067B; Wed, 31 Aug 2022 13:15:51 +0200 (CEST) Date: Wed, 31 Aug 2022 13:15:51 +0200 From: Jan Kara To: Zhang Yi Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, cluster-devel@redhat.com, ntfs3@lists.linux.dev, ocfs2-devel@oss.oracle.com, reiserfs-devel@vger.kernel.org, jack@suse.cz, tytso@mit.edu, akpm@linux-foundation.org, axboe@kernel.dk, viro@zeniv.linux.org.uk, rpeterso@redhat.com, agruenba@redhat.com, almaz.alexandrovich@paragon-software.com, mark@fasheh.com, dushistov@mail.ru, hch@infradead.org, chengzhihao1@huawei.com, yukuai3@huawei.com Subject: Re: [PATCH 13/14] ext2: replace bh_submit_read() helper with bh_read_locked() Message-ID: <20220831111551.pjrcx2ld6wm5trct@quack3> References: <20220831072111.3569680-1-yi.zhang@huawei.com> <20220831072111.3569680-14-yi.zhang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220831072111.3569680-14-yi.zhang@huawei.com> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_SOFTFAIL, T_SCC_BODY_TEXT_LINE autolearn=no 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 On Wed 31-08-22 15:21:10, Zhang Yi wrote: > bh_submit_read() is almost the same as bh_read_locked(), switch to use > bh_read_locked() in read_block_bitmap(), prepare remove the old one. > > Signed-off-by: Zhang Yi ... > diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c > index c17ccc19b938..548a1d607f5a 100644 > --- a/fs/ext2/balloc.c > +++ b/fs/ext2/balloc.c > @@ -142,7 +142,7 @@ read_block_bitmap(struct super_block *sb, unsigned int block_group) > if (likely(bh_uptodate_or_lock(bh))) > return bh; > > - if (bh_submit_read(bh) < 0) { > + if (bh_read_locked(bh, 0) < 0) { I would just use bh_read() here and thus remove a bit more of the boilerplate code (like the bh_uptodate_or_lock() checking). Honza > brelse(bh); > ext2_error(sb, __func__, > "Cannot read block bitmap - " > -- > 2.31.1 > -- Jan Kara SUSE Labs, CR