Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp501368rwb; Thu, 18 Aug 2022 07:28:45 -0700 (PDT) X-Google-Smtp-Source: AA6agR6B3orbEcuAUjGFbcUcXMj5saUtOTNAcTmT5Ltgp2WJtjV75QPeViR+XgtDkTqEGBQ2CwXF X-Received: by 2002:a17:906:d554:b0:731:7e0f:2b48 with SMTP id cr20-20020a170906d55400b007317e0f2b48mr2009337ejc.314.1660832924959; Thu, 18 Aug 2022 07:28:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660832924; cv=none; d=google.com; s=arc-20160816; b=bHqxOa1EJW0QSP+DtcRkR29AbW90kpPRp01+QGw5T6nkJHUk66LB4uus4khhh1qbDw 7gbJd9bIjW3y1eU1KWtCJnuh/cw2bLVedSXBXTPsPvW3Rr8NoJ+vQ7lEPW5Q5D/LBkEX jS8D38IKLCFG5TWvcJ2PJS8UHAvQcxZwJRv6804lW4WWOiHUCtgZPLeeDvFYArJWWSN9 5eiVYsRorRFSjUvDEB7avfqJ8/jT6Jf0KwdAW3ZjRd+YD/uAqRpCa8dPmJM3F6iCzkmN FEtoyLdcTzOSqKtiye50zN6w3IFSJ+ON/gwfQu/JkZZAJhktzoEQgtkxNke0BpD5AjLX So/w== 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=GpYi5kcB7vtNPJ/5AspONSGAjwP/p8OVH1B6C5LznKQ=; b=r+UjhCBkKs+rlmW/7ZFosPCIKYqN+SAdazG0kArMCM0PUIkw91oRpg9ykw/Ozuh9Wr EJiOJAPHvXQuxW7+XKCSs0LwbrRqQaRQ0c7Ph5HO7BxICyrqpgAg8r6KWnZ+Ons/YM0L VH8ilG7RV4oxhDifJ6OJGaGxCHgNdupEwYjKRFdaiWaziBFYzaUE7XEEKs4U+Bq14O2L KICR+zOU4tLBJGcxcO/bjK0O4KVZazNgVNOZX0iA9AxnfrgtMxoWUm24BHhTWKqDLJAq SqrC6hpQWvFykd5y3PfR5nsJj3fwRaP/vTNGlheIktwXbIWYXSGdWo9Yu8vzGjdWu8RC OxcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=OFgpA0ZB; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=A5fRpnAd; 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 kf19-20020a17090776d300b007331abd5bd6si1114998ejc.174.2022.08.18.07.28.13; Thu, 18 Aug 2022 07:28:44 -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=OFgpA0ZB; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=A5fRpnAd; 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 S235303AbiHROQE (ORCPT + 99 others); Thu, 18 Aug 2022 10:16:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235049AbiHROQE (ORCPT ); Thu, 18 Aug 2022 10:16:04 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53DB1861CC; Thu, 18 Aug 2022 07:16:03 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id F37FD37ABB; Thu, 18 Aug 2022 14:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1660832162; 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=GpYi5kcB7vtNPJ/5AspONSGAjwP/p8OVH1B6C5LznKQ=; b=OFgpA0ZBjKabpg3z110AmJ8jzy/U/tFq7VhbMfB35zC9BdU5GFZhbEWr3y4G0cWvMhSwy8 2m2DkejS/+6vBeyDVYxUzC4dQ9D0n05JwoyrbPNby/1RQx7BoVTHAiSeTpeZwYn4lnBY/z QlnBH6TYIYoR5/utubHZ98l3Z6BqS7E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1660832162; 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=GpYi5kcB7vtNPJ/5AspONSGAjwP/p8OVH1B6C5LznKQ=; b=A5fRpnAdGBcZsbPFXW9+z0b0TxPKR/QSrQKadPAh34ThEXZtC5+665CxpD2WqJpa24djlq 0ODq/3Q8q9byr4BQ== Received: from quack3.suse.cz (unknown [10.163.43.118]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id B452D2C188; Thu, 18 Aug 2022 14:16:01 +0000 (UTC) Received: by quack3.suse.cz (Postfix, from userid 1000) id 7076CA066C; Thu, 18 Aug 2022 16:15:49 +0200 (CEST) Date: Thu, 18 Aug 2022 16:15:49 +0200 From: Jan Kara To: "Ritesh Harjani (IBM)" Cc: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, Jan Kara , Alexander Viro , Christoph Hellwig , linux-ntfs-dev@lists.sourceforge.net Subject: Re: [PATCHv3 3/4] fs/buffer: Drop useless return value of submit_bh Message-ID: <20220818141549.5db4qxcnkr2miqo2@quack3> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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,URIBL_BLOCKED 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 Thu 18-08-22 10:34:39, Ritesh Harjani (IBM) wrote: > submit_bh always returns 0. This patch drops the useless return value of > submit_bh from __sync_dirty_buffer(). Once all of submit_bh callers are > cleaned up, we can make it's return type as void. > > Signed-off-by: Ritesh Harjani (IBM) Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/buffer.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/fs/buffer.c b/fs/buffer.c > index 55e762a58eb6..c21b72c06eb0 100644 > --- a/fs/buffer.c > +++ b/fs/buffer.c > @@ -2801,8 +2801,6 @@ EXPORT_SYMBOL(write_dirty_buffer); > */ > int __sync_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags) > { > - int ret = 0; > - > WARN_ON(atomic_read(&bh->b_count) < 1); > lock_buffer(bh); > if (test_clear_buffer_dirty(bh)) { > @@ -2817,14 +2815,14 @@ int __sync_dirty_buffer(struct buffer_head *bh, blk_opf_t op_flags) > > get_bh(bh); > bh->b_end_io = end_buffer_write_sync; > - ret = submit_bh(REQ_OP_WRITE | op_flags, bh); > + submit_bh(REQ_OP_WRITE | op_flags, bh); > wait_on_buffer(bh); > - if (!ret && !buffer_uptodate(bh)) > - ret = -EIO; > + if (!buffer_uptodate(bh)) > + return -EIO; > } else { > unlock_buffer(bh); > } > - return ret; > + return 0; > } > EXPORT_SYMBOL(__sync_dirty_buffer); > > -- > 2.35.3 > -- Jan Kara SUSE Labs, CR