Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp2540896pxy; Sat, 24 Apr 2021 19:58:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyN1WoOPCLNtH8/sTLUw+sFGM7BkCg7o+RaSeumXwYT3mZH3PKhLsKUg+y6Q/ov/bhdGtJb X-Received: by 2002:aa7:c2d9:: with SMTP id m25mr13530921edp.188.1619319524858; Sat, 24 Apr 2021 19:58:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619319524; cv=none; d=google.com; s=arc-20160816; b=qoq4uFAIVtEAzPZxQsq67mYti2uPJF3JGWNGMWSh2sLn686Impw8TQJCZ5p/nD7iFM WW+XpTVbOXoycXMViKYiu5Nn3mu3jB8MUxgGKqknuQsudoQfdg0BnVDgaOYKYpyGYpdE W2f9AGpOpPmUvtJ+W2f0EDTcH6g5uanuIftGWf5lq9x8mdNJ9xPMoKESe51Xpv1Drbep 6VcibK+wO1JboPuC3f13Kd2hCHcaTcN4AVrewkC2U0yM/TwUakoy2goZBdbyEU2GcP4Y 4C8YG4qn9lVefnbSwCowY5iTre3LNn/WFARtv7xXjFhIUKuPwYa08qlQfLY0sXPoCwtW /ZDQ== 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 :message-id:date:subject:cc:to:from; bh=bbUf65qPeHQtDrwXnm8jpAR2hEj5lvUS08q7O2rZu+Q=; b=nHR6uPrRw+jUCOSVeIXER3mrxm/1AfEJbiDiU+iwh2q7f7xOCyXfwcDYTSHlwwA4zs 4s3tKPAos0X20DW6ulxCzp3T7pF7BQIS2cvd8kY1vo3RqNkwYiHrbWrVHr4oSa5bFnmD xAwZSEZSAEkQ6ho5a4fsnzy3jI/++N/SwOH1ApudS6P/lLqA7Gks28OuuMTDx9pFLYg0 GYxSsYTG+cHDn6aU2rwKAIiSe1Ef9W8gbquYBWde47JZCPQvb+hPtIk4HOs6v9G8snRv jqKpJJzM81iSZ+ogOaV2JrhMkx2c0zqXO4dDz+i4qSVju2/Z+5/mSpJ4gO7mj3fqGjOC 4S8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bm27si9308603edb.242.2021.04.24.19.58.21; Sat, 24 Apr 2021 19:58:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=vivo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229607AbhDYC5w (ORCPT + 99 others); Sat, 24 Apr 2021 22:57:52 -0400 Received: from mail-m121145.qiye.163.com ([115.236.121.145]:27952 "EHLO mail-m121145.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbhDYC5v (ORCPT ); Sat, 24 Apr 2021 22:57:51 -0400 Received: from wanjb-virtual-machine.localdomain (unknown [36.152.145.182]) by mail-m121145.qiye.163.com (Hmail) with ESMTPA id 61EA4800057; Sun, 25 Apr 2021 10:57:10 +0800 (CST) From: Wan Jiabing To: Mark Fasheh , Joel Becker , Joseph Qi , ocfs2-devel@oss.oracle.com, linux-kernel@vger.kernel.org Cc: kael_w@yeah.net, Wan Jiabing Subject: [PATCH] ocfs2: Remove repeated uptodate check for buffer Date: Sun, 25 Apr 2021 10:57:02 +0800 Message-Id: <20210425025702.13628-1-wanjiabing@vivo.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgYFAkeWUFZS1VLWVdZKFlBSE83V1ktWUFJV1kPCR oVCBIfWUFZGkJJQ1ZLS0lLHh5CHRhDGUpVEwETFhoSFyQUDg9ZV1kWGg8SFR0UWUFZT0tIVUpKS0 9ISFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6Mjo6Tzo5NT8NLAMeTyM3CUsP OC0KCx9VSlVKTUpCSEpCT0hLQkpJVTMWGhIXVQwaFRESGhkSFRw7DRINFFUYFBZFWVdZEgtZQVlI TVVKTklVSk9OVUpDSVlXWQgBWUFKQ0hJNwY+ X-HM-Tid: 0a7906f59d93b03akuuu61ea4800057 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In commit 60f91826ca62 ("buffer: Avoid setting buffer bits that are already set"), function set_buffer_##name was added a test_bit() to check buffer, which is the same as function buffer_##name. The !buffer_uptodate(bh) here is a repeated check. Remove it. Signed-off-by: Wan Jiabing --- fs/ocfs2/aops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index ad20403b383f..bd039fdbb27e 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c @@ -634,8 +634,7 @@ int ocfs2_map_page_blocks(struct page *page, u64 *p_blkno, } if (PageUptodate(page)) { - if (!buffer_uptodate(bh)) - set_buffer_uptodate(bh); + set_buffer_uptodate(bh); } else if (!buffer_uptodate(bh) && !buffer_delay(bh) && !buffer_new(bh) && ocfs2_should_read_blk(inode, page, block_start) && -- 2.25.1