Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp36903rwb; Wed, 17 Aug 2022 22:12:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR4VqyBxpt16Tixew5t3Vqz/KOXjwRIoLHLH8JYemK1+wOX2Qw7MuNUauH/NVaOCB2PWQ+7f X-Received: by 2002:a17:902:f604:b0:172:75a4:33ea with SMTP id n4-20020a170902f60400b0017275a433eamr1172531plg.7.1660799552887; Wed, 17 Aug 2022 22:12:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660799552; cv=none; d=google.com; s=arc-20160816; b=B6jvShYDcH5lXyHfh8Wtkv8uD2dEKrDIPviPM7qgs2cuhjSIttc8K3biaZdk8bJ+GU IGebAE150FHxo62IdFc4Ym81RiMzaucvRt/LkWd5yXUeuhO/0h2Ls9Oui3mED1iDrqXp oGKmWT0/1CF+JOzw8hU4CYYJQ+aYmvM0eJJz8aQ+XeyPdMmbVMWrq8lz7ppOhQ+ssvyC cAhxT+QTBfXFF6y9fiZhpNNvshglYORI/SmJKe0SB1c+5CPFvBaJqasIqK7CfyT/mdC7 /qi85HNwzCwo+ATbA6LaqwI8TaE0GZMg9poHGIecR0e8fHGw4+DHHJpRRnfn7R/TwA32 RqIA== 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=lFuT8sSYLisADIw9ypCi2dSipGCRvABVMWuXbHp7qjo=; b=iLA4WENel1N+KEAdA1aWS0FGM3WF3T4AGdoMzzlmi4OXNBSddlxcA1syEFBFfy01nY dIWSYvlQYmW+V0q9BQAcpII05ujhFV57EEqOHAjmjgyAA67UGQ6/KVixn8w8aedRAx6Y 3xfguZlelDua7GieOilF013hKCtUkTtTuPDX4fKbBejDeZyMqsArXnlwVfEMwDzYz86J UirOG1+7g9Rb7iPoZzjhdN45GcBMVT8nkZU8VrzFAsqwdU88apqyFap7oORBjHddcswq XxIdZl31xQpetXpDh7rsjW2JocF8WHMcwe0qdQ4f5yIIC5qtfXkV09Xanv3SaLSSmxR3 f2XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=X0zxD3Zn; 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 x8-20020a170902b40800b0016c4f0fc8dfsi412926plr.598.2022.08.17.22.12.15; Wed, 17 Aug 2022 22:12: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=@gmail.com header.s=20210112 header.b=X0zxD3Zn; 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 S243066AbiHRFF2 (ORCPT + 99 others); Thu, 18 Aug 2022 01:05:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243322AbiHRFFW (ORCPT ); Thu, 18 Aug 2022 01:05:22 -0400 Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95FB7A6C5F; Wed, 17 Aug 2022 22:05:14 -0700 (PDT) Received: by mail-pj1-x1034.google.com with SMTP id f21so645044pjt.2; Wed, 17 Aug 2022 22:05:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=lFuT8sSYLisADIw9ypCi2dSipGCRvABVMWuXbHp7qjo=; b=X0zxD3ZngJqjrX8kUd/aa/EKxd3QJ4ZJS8mx9d3QoEEhujzjKKJkTW4N7x+zbs3gNd 9SoeKQr1iZugICY2hKCKXK/enkv2R5Pm2Z2JEbRe8V+okITZGaCW9FPphK1iGjqgYVPc CTiVlRQKlSDrVf885a7/I+7QeQwXgonXuveQJCACCyjo//48vHBq0KyFawLzag40hr9V Rto0b8EqF36V1cvL4b52DOByjqvyZpjGnGkSG7qzLT8KIRwDoNFKEuP9dtAHJOtN9AR5 Mcbe6SrYtfCAoDKsafGB+ov7oAxkIKGg5EAsgncs6v8649kcePvW/ZanY4XJgtw3aWVU iXkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=lFuT8sSYLisADIw9ypCi2dSipGCRvABVMWuXbHp7qjo=; b=FxV/pmk2Qjq4NEvvhjwVAyM27rJknW++5l4OX4GNWNQel2MVSRIdcS1uw9n8gBTR2h FS5ssFVMsPku9UkszncLaTyNq1Db9i/FU9jpczSCHL2VURDAXsWqlXkTkyTRT+Q7spNT ob3Fc//mD9LN73B9Ayml1tadRIjVmyIkINDzFoVjib2ubSqlBrHn6xt9mrd73d7+3N/7 f8XdKA+fjvdgYu59h1YPs6ioNpCpBTiwfTqvQVQxO+v7r8oZoMjrKPQn6swnHPZS39TH VaG6NbU3i5kjPTWCxiWPc65RnM1relarZTvdf7WsXH6lSPuUSXpbx9Xnb6hJgT4ekdv8 XGFQ== X-Gm-Message-State: ACgBeo3UrSNilIMleTLzm4mLIgNPmNofLF9hw1u7epdliTm/REJ5Bksf 8Aq21pv2tSKKufAx04O1nWdDFmiLzKY= X-Received: by 2002:a17:902:ab98:b0:172:a566:d462 with SMTP id f24-20020a170902ab9800b00172a566d462mr1195248plr.53.1660799113945; Wed, 17 Aug 2022 22:05:13 -0700 (PDT) Received: from localhost ([2406:7400:63:e947:599c:6cd1:507f:801e]) by smtp.gmail.com with ESMTPSA id w1-20020a170902e88100b0016f196209c9sm343614plg.123.2022.08.17.22.05.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Aug 2022 22:05:13 -0700 (PDT) From: "Ritesh Harjani (IBM)" To: linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: Jan Kara , Alexander Viro , Christoph Hellwig , linux-ntfs-dev@lists.sourceforge.net, "Ritesh Harjani (IBM)" Subject: [PATCHv3 3/4] fs/buffer: Drop useless return value of submit_bh Date: Thu, 18 Aug 2022 10:34:39 +0530 Message-Id: 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 (IBM) --- 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