From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 B979B2773E4; Sat, 12 Sep 2026 19:11:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789240290; cv=none; b=CYM7RGbC+sRtw6qwY06Dz/6kBdNBCspzNYcoEXfQim+si9LLwRKgNsrCaT05rOs4nsHJ+gl/xfX4IWwsY8njug8oT+4+ddWvbp7TDqLbNC59Af8yvUQf/YtOcN6fo5ATLAzXCXyEFVOj0Z1fqPociSSvGm17Oq5No7dXhkNUti8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789240290; c=relaxed/simple; bh=LJQPeW080e/RKPLzXhPU6DGOKcLinTnXJfr+ySPOO+I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WZzHwal3wcgnsv6u7zMegxmceuM2MkwzB6KuwevLepTgJoWA/Ziu/UrZDu/DSNivLDbxobH2+s48jRhW8yEP3CeKpR7r83rkuXFIGRbd7maPMK4ilndoKQrsBSawN1kPQRljzmLSwXfw7gOoehkiUl/BnZYS12sJoywjthRLN94= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OB23RiSG; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="OB23RiSG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDCF41F000FF; Sat, 12 Sep 2026 19:11:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789240289; bh=EBMIA8lLH/CbX1yRC0q3heaYEwpzdQapJ4VPXdni/CY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OB23RiSGB3FGUYLcPEFYpsnJB+AAFlE9TUR5e9VynSYUmTIr4ivZO9OEilZkE5yGR vcCZeICEiws4J0D2hxaHP8LYDPosDmo8Nc79TYtdtYk3aeCQ80Trr2y7hkmrEsrmra u3kU3ruTrFpEgMmkG669hEWSBaZOu/p1hfhQ589g= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Agatha Isabelle Moreira , Arnaud Bonnet , Trond Myklebust , Sasha Levin Subject: [PATCH 5.15 838/935] nfs: replace atomic bitops sequence with clear_and_wake_up_bit helper Date: Sat, 12 Sep 2026 09:04:28 +0200 Message-ID: <20260912065546.045128285@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065526.833703348@linuxfoundation.org> References: <20260912065526.833703348@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnaud Bonnet [ Upstream commit 61461050da42401b484d03e0fdac02878d235fe6 ] Commit 8236b0ae31c83 ("bdi: wake up concurrent wb_shutdown() callers.") introduces the clear_and_wake_up_bit() helper as a wrapper for the common clear -> barrier -> wake up bitops sequence. Use the helper in nfs_clear_invalid_mapping as inode.c already relies on functions from and to homogenize with other subsystems. Suggested-by: Agatha Isabelle Moreira Link: https://kernelnewbies.org/Beginner%20Cleanup%20and%20Refactor%20Tasks%20by%20Agatha%20Isabelle%20Moreira#task_007 Fixes: d529ef83c355 ("NFS: fix the handling of NFS_INO_INVALID_DATA flag in nfs_revalidate_mapping") Signed-off-by: Arnaud Bonnet Signed-off-by: Trond Myklebust Signed-off-by: Sasha Levin --- fs/nfs/inode.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index a8ac939edcf7e..c87d4939b4fbf 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -1382,9 +1382,7 @@ int nfs_clear_invalid_mapping(struct address_space *mapping) ret = nfs_invalidate_mapping(inode, mapping); trace_nfs_invalidate_mapping_exit(inode, ret); - clear_bit_unlock(NFS_INO_INVALIDATING, bitlock); - smp_mb__after_atomic(); - wake_up_bit(bitlock, NFS_INO_INVALIDATING); + clear_and_wake_up_bit(NFS_INO_INVALIDATING, bitlock); out: return ret; } -- 2.53.0