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 4619E39A4A0; Sat, 12 Sep 2026 20:02:19 +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=1789243340; cv=none; b=upzLBkrLzRvPL2EWZyJpzuSjKhikOCkwPF0MOA64BCkZB7p0r06+pXFjorsVLvR8L3lv3xrs+etpdSTqLucyDKbqkj+zxlwYiHfpvLmTVpZYCXEhLwVuZv1X0Utzi9K9MF1fOq6wN1W9D7OXqtrwsfqD6jFr4lL7ajEKIraoKYk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789243340; c=relaxed/simple; bh=UauUwOUAF+TbpBSNemuj3rx3p5Ek7wPK5IWQ6E19rwM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dfGWdH9G5ZTdrwktCiyFfgzVXcoT8e2gsiKDVyYJ8ikzAxm91qO4G8D3Tz/1QaDOFfOFl5G5lo/fgAI7Lr0bR2rErlJAKOSOxEzb5q3v5d16tSkv29uiEW1eQCxPgqTPRln/YHm25urn4/Opshy/HqVtzTjxbO42JyuA6u0Ylpc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=XK25PS5D; 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="XK25PS5D" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A11051F000FF; Sat, 12 Sep 2026 20:02:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789243339; bh=xEzMMM15TRir0kMYf+huKtIdjh/itHAKoXTDqAi2oow=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=XK25PS5DpIZMtIKd+cv3LtZkZ9j/UcqSdRuZiUdIVonIUw67yd9L8CA3ZVhhie4v+ i3diax6XOHsAexV70NGWzvcAEiUjreYnfp/ESjJvu1rZ+kKgj5C6T8eFZjFVoWSJWE h4YBtSIDa60S2mbuRy99/HurNwsA0DcAfmO7CcTc= 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.10 721/798] nfs: replace atomic bitops sequence with clear_and_wake_up_bit helper Date: Sat, 12 Sep 2026 09:05:49 +0200 Message-ID: <20260912065533.606132743@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065516.948645775@linuxfoundation.org> References: <20260912065516.948645775@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.10-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 40655b56b6f5e..15ea2aaae783d 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -1329,9 +1329,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