Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2673487iog; Mon, 20 Jun 2022 02:06:05 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vQV9QYtayQLHS+x1T5WaH9ucGHZu0LpzpG68uMyCIX5OPAitEU12Oa6POgkjpnNMdXyJ1c X-Received: by 2002:a17:90a:f483:b0:1ea:84a5:222c with SMTP id bx3-20020a17090af48300b001ea84a5222cmr25910393pjb.47.1655715964781; Mon, 20 Jun 2022 02:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655715964; cv=none; d=google.com; s=arc-20160816; b=fdspHjeJrNPaOcVPfoB2qSDLVQUNFyyR3V0Gs9yOyMAapQCOsr2VGhbAsMu+FPcFhM CwcP/vV1rpm2b54owbCTkuPXwPdVOXLWS4Glurc9muN/3wtbMartwhq/Dk5oSgfdn2bg ruB1ZhF3WrBKfXsBZB1GBTl/WC4FlS8Kb+QuMJ++G8jkWElYqmRzNgKjN/Ze2EkkoHiY kAQvS36IaiikiCtyhFDVXHYVtEwKHVI9aUhbRsd23lMub5ZPhsvNwYgt8N2VSxsX6x2c s3ZQEm6qOiQuN6EDqM9TfUH+keQHnTcgFUyAyby2ig1AKQg3iLYp/twVZaUrulAdLyZo 9gdQ== 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 :dkim-signature; bh=XS460ssN5m8qIg3j92C0hAPAV/Z5ErmQruhxnIIvXYY=; b=oPqIc2nXYwKluURn8APitJXsumE722z1n95n2C4UloMDY735NDOYK7F8AI6KL3pId2 2sQ58Sc0pbV0GzjfbAWpCXFvM4TviPZ4bVEc6b1UlV8m4lKs8nFTO3fKrc7eWRplzshj NOk5iMPtdwHASy2H61t6NWyQ2maO6IThkQeT4bUadr/wT8BKO9L/ADqz3boy3H9idtxD 0umBKFg1Ta68vgj/72+OKnIofh34qhDcR5nX7yd1qprKSGNLmGOLheK0IVj/XXPt0cvw x8HuNI/Rc8F/UtFTX4dHgJc5x/xPuC9HxpehXw4SqXclx+h+8VffpXz87ONeXG8P9Zqj vQTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=CiCtG6+G; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oo10-20020a17090b1c8a00b001e8927e0614si14811279pjb.171.2022.06.20.02.05.41; Mon, 20 Jun 2022 02:06:04 -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=@gmail.com header.s=20210112 header.b=CiCtG6+G; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240545AbiFTJFP (ORCPT + 99 others); Mon, 20 Jun 2022 05:05:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47720 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240498AbiFTJFJ (ORCPT ); Mon, 20 Jun 2022 05:05:09 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CB5F558D; Mon, 20 Jun 2022 02:05:03 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id d17so686248pfq.9; Mon, 20 Jun 2022 02:05:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XS460ssN5m8qIg3j92C0hAPAV/Z5ErmQruhxnIIvXYY=; b=CiCtG6+GH5kziOsKycnqctyJHyCpazKfIc4YHjwpme8uwPmn1ldfoRY5P0BNShFdmc IqOmxBdJwBCBHpsGGJtI/130YEWeNPuOSz9g69Ba0JMJqBP/5oLpndCqJErSm9YDKwZS WKMIeCHxqErAHt3Dx+TxWEDsp3+HVS06+JDFeNFqiIisCsfSHDhSRrxGdf+5Na8Xpt+Q 0zGJgB7+hA36TkKW9NvubAQqiGcWAml0M7GRuixFegn4gS0oqTnYAusGHxukPQOFAbyy X7bYDstD+aCPNxGO1E+0eGYT2rf0amFvEmEbCiPLlhyWvZ9Idf/EpWj0Yc3zM4A4LEe1 P/cQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XS460ssN5m8qIg3j92C0hAPAV/Z5ErmQruhxnIIvXYY=; b=32ENWMKPJVsXS0c+1tmYwaorMXyqewi4nCwfuOak7aQvysbvx0MpdPHYiYQvH2xwz3 opJmf7sqX57vRPBxDGbqesrZJvaMDqZkXI/dKy3EDZXpGlsVzm8+jvQfVBF5s8qbN1EZ +TsIzMo4Lr3STRjrDsxkvZiDLKIZngGHqxNw2sRzzOcXv3QtFT6C1plzc7TVxP6MPnQn 9Vd4FC6tc0UC+tDkzfKd2MFFcvJ5coJEpXZmEv1eGSPYWkmgrfQbN5HEWnWZUeMB0cVE fdUIUuTCeXkdJ2eR+Xb2zWMEnHtKwWTCU7jQyjSSs4Dw0101/4x4eyejV7wVOvWe49lF 5m1w== X-Gm-Message-State: AJIora+HMPvkzeaw/JrWFZzV/tS5mAvHTpAcVJOTtDFMZcn/E1Acue+H 9oscwW9KypelLKfgi2MxHm+g3W+wL78= X-Received: by 2002:a65:6a05:0:b0:3db:27cb:9123 with SMTP id m5-20020a656a05000000b003db27cb9123mr20834886pgu.497.1655715903020; Mon, 20 Jun 2022 02:05:03 -0700 (PDT) Received: from localhost ([2406:7400:63:5d34:e6c2:4c64:12ae:aa11]) by smtp.gmail.com with ESMTPSA id y10-20020a170902d64a00b0015e8d4eb2c5sm8099729plh.271.2022.06.20.02.05.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jun 2022 02:05:02 -0700 (PDT) From: Ritesh Harjani To: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: Jan Kara , Alexander Viro , Christoph Hellwig , Ritesh Harjani Subject: [PATCHv2 3/4] fs/buffer: Drop useless return value of submit_bh Date: Mon, 20 Jun 2022 14:34:36 +0530 Message-Id: <0930c57e0943c4ec7a184725a3d036f917081da6.1655715329.git.ritesh.list@gmail.com> X-Mailer: git-send-email 2.35.3 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 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. Reviewed-by: Christoph Hellwig Signed-off-by: Ritesh Harjani --- fs/buffer.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 898c7f301b1b..313283af15b6 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -3121,8 +3121,6 @@ EXPORT_SYMBOL(write_dirty_buffer); */ int __sync_dirty_buffer(struct buffer_head *bh, int op_flags) { - int ret = 0; - WARN_ON(atomic_read(&bh->b_count) < 1); lock_buffer(bh); if (test_clear_buffer_dirty(bh)) { @@ -3137,14 +3135,14 @@ int __sync_dirty_buffer(struct buffer_head *bh, int 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