Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2551561lqp; Mon, 25 Mar 2024 02:15:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXb7xLGhS3XfaKGu0EspecrG2gdPwgYgcT4Ql8cew5TKGVZwdz1ua6NnQhrEE2FsBFCmNTznu2rNpuKLDMxZ0tV3Z0yoH6UbMHUUSbimw== X-Google-Smtp-Source: AGHT+IEYYWf9eXehxJZDEowSlhkMLenEDtnyNlnYRuRf0ScUeHgAZhYed+j9MgAyzJ+TC11/cxLk X-Received: by 2002:a05:620a:22d8:b0:78a:211:2d36 with SMTP id o24-20020a05620a22d800b0078a02112d36mr6603820qki.78.1711358148202; Mon, 25 Mar 2024 02:15:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711358148; cv=pass; d=google.com; s=arc-20160816; b=Ez4OX919bQr6WbibZCYkmvXqW07akxQ7BdlMTrgzdrYfvVUeXMLv562qoz7LOW4JLT 2VidSz9W4xJChEvNP6E+ctX8MAgTsYXKhqoS8yO7l/H3ExymSQfLCHTua93RZyUEZEzd 1Wbcstoj5ARllQA6h1qodHmpQtdQQ+sBeO16spfvzenkU7ou3fKpOj2sc2qBzY9KOycj UyyNnSgqkhC69J3hvUPOPFFMA9C/rCWS1IVk2lrbiSy9VhvD9UR/rruPnIHH9jBJtqUm /E3WQcqfooKXrljgak+PaC4uo4VRJV8uk0cTFSuQN9ppWsWYi1AtSVLHz7cDbne+lfaR /TxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=EoEOdKpqDkmNHOFyH1GqO4AnapDPlbV6WZ6NAYZBe/M=; fh=eP83VwY2imqUkKC335Vf+S1zDQ2JKOagjMIogzy87iQ=; b=NuNqfPCAC4xHUYOY39y4BTl7kkv+9thgyMKdsG7JsOIzOyFButkpio9AMwJiWXIgGx 9NSXmhrLX4kl24XcRwDvyEuwQGNVR/CSTyHcQt+ChfIUdNIkAMZQpzeP75l1z+MTV2z5 fZjCne0ISMea5hxonTJW2FbR46/EbF9T0GhGI2T9R0XagU8jshCik7UfxNyVm1XFes3k VsHnIfyEl5QoW1eIp2hgbJ2eIfCv06mls0bLedsphp7RW2oNZMUvvoXn/76nHXzx/C4l mcPswazpu4+Xivt+cZnI+F/4MPh7ScrLZARis2vYnH8We2hMBlqFVFk5y/H0bUqFAXw/ XodQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rSOLcnTy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115749-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115749-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id i3-20020a05620a144300b00789fcdb2dc7si4975802qkl.108.2024.03.25.02.15.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 02:15:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115749-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rSOLcnTy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115749-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115749-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id E97341C30C8A for ; Mon, 25 Mar 2024 09:15:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2980F14BF96; Mon, 25 Mar 2024 02:59:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rSOLcnTy" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5CDD52251F2; Sun, 24 Mar 2024 23:12:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321937; cv=none; b=mOH9apUAtkh9zra06JsPGkNP982XigEd1h0TtSKCzt0sYl/W8/dGBuEKKTOIHaSu/lhRrWyHyBYJ3Cet46tNAdUwF0//K6Qlyx+6Jw6CTev2E9zCsax1NVR2WA3csAJCFIQFJlrJdRh8hBBVzqN5mMHTPg3AWaP/QnOzh7+PXaU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711321937; c=relaxed/simple; bh=XT1yZ8Jye37Pt1dNEFHUCS6lEDPqswFnIVZBkfvzm7Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oieUowT/xzbozSS9SI+Z9f2F93VRgawropQjz/2FecixBPO92HJqnhcrXpf8xLxHDpdaovxNZFUoeRA7cks7gJh5Svf9C06A+U5mZ5O0yjTgCzyM1K7U4FtFI1lLx9xsrqkbPYD36stQ5YFiyAXW4sIBhvxovNikC+mH8X/5fHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rSOLcnTy; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99E46C433F1; Sun, 24 Mar 2024 23:12:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711321937; bh=XT1yZ8Jye37Pt1dNEFHUCS6lEDPqswFnIVZBkfvzm7Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rSOLcnTyl6Q525aTy5tGUBkjv0bZtq3qL0dEGr/YwCodCNYHjYWAyem3xHssPh1x+ h6t+OT4sZS/M8MyRrZB6HZQNAh2V56VueogJsvQQSJpmDqviIk8P843VFwbiu/DyQ2 Ipj8I0LGLAQnx8/ChqbanCwbC6YgLkcKkdevgFBq76AexATvibeU70BpdW5MZlsZ7s KUMz++13J/I5gNNX6MJNeGXMDrQ2sc80VTZYtHReKUALLSl7d3pVI7GD+2ZFeX446F /jmsp0sIpVv/2Gv5nPJy/1cR0LNZd1VB26ym70pzmL1OLaPCN38ATlA7QB89Dnow7p cBXYOfs8niVkg== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jeff Layton , Chuck Lever , Sasha Levin Subject: [PATCH 6.1 008/451] nfsd: simplify test_bit return in NFSD_FILE_KEY_FULL comparator Date: Sun, 24 Mar 2024 19:04:44 -0400 Message-ID: <20240324231207.1351418-9-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Jeff Layton [ Upstream commit d69b8dbfd0866abc5ec84652cc1c10fc3d4d91ef ] test_bit returns bool, so we can just compare the result of that to the key->gc value without the "!!". Signed-off-by: Jeff Layton Signed-off-by: Chuck Lever Signed-off-by: Sasha Levin --- fs/nfsd/filecache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c index c36e3032d4386..568963b8a4777 100644 --- a/fs/nfsd/filecache.c +++ b/fs/nfsd/filecache.c @@ -189,7 +189,7 @@ static int nfsd_file_obj_cmpfn(struct rhashtable_compare_arg *arg, return 1; if (!nfsd_match_cred(nf->nf_cred, key->cred)) return 1; - if (!!test_bit(NFSD_FILE_GC, &nf->nf_flags) != key->gc) + if (test_bit(NFSD_FILE_GC, &nf->nf_flags) != key->gc) return 1; if (test_bit(NFSD_FILE_HASHED, &nf->nf_flags) == 0) return 1; -- 2.43.0