Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp2539369pxy; Sat, 24 Apr 2021 19:54:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxy4IVdmVRvxVTT8Q+ozS8E/zIFPfEAByYZQe+lc2AVefXzYd1DY4e0l/DtKVAbo3y/gBSl X-Received: by 2002:a17:906:4a89:: with SMTP id x9mr11447932eju.121.1619319293846; Sat, 24 Apr 2021 19:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619319293; cv=none; d=google.com; s=arc-20160816; b=cmq5W3O1aCNbkS8Pe1f07L2eLUW6VuqsNFW5xKUnf1WwZh3oZ9IdxPo7WFy5I+AfCf QOKSx5HFwfgj/a7K9A/dp6aJcoXyX/wrIGPDyH8gCqnwSPLh0GLgMMkwUbERGcSE9F3B 2S7yVYkuUxUra9Qu6q6iiMDcAHLMPm+4+ADk/dXrEHhBIYYI9elWXtgZuu22ms118m92 BCiZiWwRNbQBVEbY07pw037Vt/5qzAZSywIcT0ZbcUksTVeaU8FI4rLiq2RsMudOXUj7 JP79ki7hPSNDLiIuqL84YJqKKsZP5j46y22tf4jpp+SUtO3QFVG1MAa30i9h8bOHwaBT y+aQ== 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=0QZIVgvheiAout9ReV3JR/EBsOx+dZzBw0I6BebK/dk=; b=tDh+NUGnTTzKhlHYVPqxED9KgyP58n1E3jFX93qLQ2OCIW8kwwS12lqA1AnwpaV/ws s7arLa0s1F3ASgdc3uxhGhZCqXpfu9BTDPYk8dwcOR7RF7TumdH7VWJvLBst/uokBxsp XxHuDclIFWObUa6rPptrbccgGjkGf/kEY6ioKBWGfofpFhhRWTx/9OGw0aW8rfh9PcrN ddpg05LYOUxMV/RxDHtzXFOPg4uXJRfxCCsgEKlmpn15zx58JFqvfAA4o/4CNuJ/9epg WoAzte15lfWU0N4Zry/uorZG37Mts/dTgFmPit9aC7muatsNoWoFqFlfSfBBjJUWD0On fvpg== 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 bm27si9312822edb.242.2021.04.24.19.54.31; Sat, 24 Apr 2021 19:54:53 -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 S229592AbhDYCyR (ORCPT + 99 others); Sat, 24 Apr 2021 22:54:17 -0400 Received: from mail-m121145.qiye.163.com ([115.236.121.145]:16260 "EHLO mail-m121145.qiye.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbhDYCyQ (ORCPT ); Sat, 24 Apr 2021 22:54:16 -0400 X-Greylist: delayed 474 seconds by postgrey-1.27 at vger.kernel.org; Sat, 24 Apr 2021 22:54:16 EDT Received: from wanjb-virtual-machine.localdomain (unknown [36.152.145.182]) by mail-m121145.qiye.163.com (Hmail) with ESMTPA id 38CE68001DD; Sun, 25 Apr 2021 10:45:41 +0800 (CST) From: Wan Jiabing To: Anton Altaparmakov , linux-ntfs-dev@lists.sourceforge.net, linux-kernel@vger.kernel.org Cc: kael_w@yeah.net, Wan Jiabing Subject: [PATCH] ntfs: Remove repeated uptodate check for buffer Date: Sun, 25 Apr 2021 10:45:33 +0800 Message-Id: <20210425024533.12540-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 oVCBIfWUFZQ0tDS1YeTUNCGUMdHk8aSR9VEwETFhoSFyQUDg9ZV1kWGg8SFR0UWUFZT0tIVUpKS0 9ISFVLWQY+ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6MRQ6CRw*Hz8VOAMcTz8fND0y DjEwCwhVSlVKTUpCSEpDTE9KTEhJVTMWGhIXVQwaFRESGhkSFRw7DRINFFUYFBZFWVdZEgtZQVlI TVVKTklVSk9OVUpDSVlXWQgBWUFKTEtONwY+ X-HM-Tid: 0a7906eb1977b03akuuu38ce68001dd 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/ntfs/logfile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ntfs/logfile.c b/fs/ntfs/logfile.c index bc1bf217b38e..9695540ce581 100644 --- a/fs/ntfs/logfile.c +++ b/fs/ntfs/logfile.c @@ -796,8 +796,7 @@ bool ntfs_empty_logfile(struct inode *log_vi) get_bh(bh); /* Set the entire contents of the buffer to 0xff. */ memset(bh->b_data, -1, block_size); - if (!buffer_uptodate(bh)) - set_buffer_uptodate(bh); + set_buffer_uptodate(bh); if (buffer_dirty(bh)) clear_buffer_dirty(bh); /* -- 2.25.1