Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2572502iog; Sun, 19 Jun 2022 23:01:11 -0700 (PDT) X-Google-Smtp-Source: AGRyM1saKbBwLBrAuKFMv6mhiX22L5LZC1wYUlDAZWIjgCj5h4/iL4zwWfsJrJjoekMFb2iWR0j8 X-Received: by 2002:a17:906:d8af:b0:715:744d:7e29 with SMTP id qc15-20020a170906d8af00b00715744d7e29mr19150884ejb.715.1655704871393; Sun, 19 Jun 2022 23:01:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655704871; cv=none; d=google.com; s=arc-20160816; b=XCsvgGIKTG8qyeh46PVgRe6dpWQtBOpBic+q9RARiKQmifaU1IoQdVQaU9pIBH9BZs Q510XDd0ESUhxzOvc9Xg2Et3JNYOedrVm4zA31jEpAYuoRpResCbm3/cBaJ0AxrAa58j aF13h95M6voaDPPtSdpo7dl3644k1731eZ3JN8oeRvZEgXmhGHpHzTIiSZwJrIvGMDwc Pk+bw8r19ZtEKJG8II38UA9PFHMTcUpRSOUueLtYNm9cRxfvng4Cwj/qQdm50vc9V+VQ 1bI1TQPHVQceMVz7zovpbZNBN2rd9dnuCSpY7xFmYXTe5CCw0p7ItTCu2HFKjgKK9E4Y u/KA== 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=Clel/4ybCmI1HGYhwncCodVfekWAtcomQbTqtWI+l0Q=; b=F+ZA24feS45FKWt3YTciRUCZAnuJNRklYJM526GcI23OSg0GHHmPQmlSodgbWAhg1I FT3Q5Rhekt5bYTB6tloHxu2b1+CN0154qBtTYW5sClUJHRPe7i2WQH2Gc/OYrVMynq70 XGA9YHaCEEl+0WIXL9knkA18pdDPsqeKIDPcnNvXcfoBhTCZQWsm9bcUjcQI3tM8eADf 4nzLGlVKjyxnmdLi6JvhkAts2av/IVAoen89JKsCTSIgh2TFKGPj5Qa17fpSIfQ16pvL tqLF9uCheXntoiGPU+ox1dvyEDczj/F8aZFehPUZ4imTW9qy+pNTxr85OoW69dG0FZIa J+6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YAbbkPY7; 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 m11-20020a17090677cb00b00707cb6a6c1fsi8900723ejn.162.2022.06.19.23.00.47; Sun, 19 Jun 2022 23:01:11 -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=YAbbkPY7; 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 S237786AbiFTF7k (ORCPT + 99 others); Mon, 20 Jun 2022 01:59:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238421AbiFTF7i (ORCPT ); Mon, 20 Jun 2022 01:59:38 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03995DFA6; Sun, 19 Jun 2022 22:59:37 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id 73-20020a17090a0fcf00b001eaee69f600so9278207pjz.1; Sun, 19 Jun 2022 22:59:36 -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=Clel/4ybCmI1HGYhwncCodVfekWAtcomQbTqtWI+l0Q=; b=YAbbkPY7AQqeGcoSQY/GDuPZ4RakV3S3JtVdiT2WDFxLmyHoRq5stiZIPZJQrz38ij P/U3fSbE00vIjIHK4rt9r8bZfVgbj/q729TbMOppW0sppD0HnGp0tDEFSQfroVrjhwQ9 Giyx24RXA9ySH70qRJUqmFGCvf21GQq5ehjsyTP8RPHcbORmTOvdY/48P6TbsaR4yMUx RjBV91bdyTjNUh1xl7G3GK5eDIYI8lYVTBoA7Jzj3Q6k2G3Ndzui4qpOdvYLb+h6xzfQ NRLXJ+L5tpLsb95d9nh6c5pe1OrCnP3pSb9bLwWD71nd+wOXQDzZxIZ/vTajbb//xPdp hhOw== 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=Clel/4ybCmI1HGYhwncCodVfekWAtcomQbTqtWI+l0Q=; b=q8eU6YYCAQF+Fr0ioRJbxHRv6NXvPb4CQrw46ekt+XbF0LU3IQ/I6BkNs9MsFMMVBU NUdGUjt6g0BQkKZgFrGi0Ue6K1Tv9NqMPd3jA31A/NnQIwJXCWVoIYxV49xF3ohsGRa6 K6gxR1FU+P6PisDDP781b2OSeuk9LeKAt1Do2wzdUCP36Gj4XwZGuzGIN9UsiEDhbneW MR3IhzH4vTTljIjLqGpurOy/g7ups2FMZdBwFhTyG1sNbei/7ELznLli5uD5TZLp9WS2 4n43RRLJpIntESDEk6UppMBJeMTAV98d8mzQFU2z7ViV0CF1UH43nDyMYqxNhp8Y6thr 5I4Q== X-Gm-Message-State: AJIora+T5Vv0lWfEbwbe71gjvb4IEZZHB7cJGaIwqm5td3MHCcPYajDA WyW6Tq6rxqZuhqbEVgHTHEDYe1AhN/M= X-Received: by 2002:a17:903:240e:b0:168:ea13:f9e0 with SMTP id e14-20020a170903240e00b00168ea13f9e0mr22599116plo.6.1655704776327; Sun, 19 Jun 2022 22:59:36 -0700 (PDT) Received: from localhost ([2406:7400:63:5d34:e6c2:4c64:12ae:aa11]) by smtp.gmail.com with ESMTPSA id v20-20020a17090331d400b001641047544bsm7709664ple.103.2022.06.19.22.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jun 2022 22:59:35 -0700 (PDT) From: Ritesh Harjani To: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: Jan Kara , Alexander Viro , Ritesh Harjani Subject: [RFC 2/3] fs/buffer: Drop useless return value of submit_bh Date: Mon, 20 Jun 2022 11:28:41 +0530 Message-Id: <77274d2a2030f6ee06901496f9c5fbe8779127a3.1655703467.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. 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