From: Mike Snitzer <snitzer@kernel.org>
To: Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna.schumaker@oracle.com>
Cc: linux-nfs@vger.kernel.org
Subject: [PATCH v7 03/11] NFS/localio: nfs_uuid_put() fix the wake up after unlinking the file
Date: Tue, 5 Aug 2025 19:20:58 -0400 [thread overview]
Message-ID: <20250805232106.8656-4-snitzer@kernel.org> (raw)
In-Reply-To: <20250805232106.8656-1-snitzer@kernel.org>
From: Trond Myklebust <trond.myklebust@hammerspace.com>
Use store_release_wake_up() instead of wake_up_var_locked(), because the
waiter cannot retake the nfs_uuid->lock.
Acked-by: Mike Snitzer <snitzer@kernel.org>
Tested-by: Mike Snitzer <snitzer@kernel.org>
Suggested-by: NeilBrown <neil@brown.name>
Link: https://lore.kernel.org/all/175262948827.2234665.1891349021754495573@noble.neil.brown.name/
Fixes: 21fb44034695 ("nfs_localio: protect race between nfs_uuid_put() and nfs_close_local_fh()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
fs/nfs_common/nfslocalio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/nfs_common/nfslocalio.c b/fs/nfs_common/nfslocalio.c
index f1f1592ac1348..dd715cdb6c043 100644
--- a/fs/nfs_common/nfslocalio.c
+++ b/fs/nfs_common/nfslocalio.c
@@ -198,8 +198,7 @@ static bool nfs_uuid_put(nfs_uuid_t *nfs_uuid)
/* Now we can allow racing nfs_close_local_fh() to
* skip the locking.
*/
- RCU_INIT_POINTER(nfl->nfs_uuid, NULL);
- wake_up_var_locked(&nfl->nfs_uuid, &nfs_uuid->lock);
+ store_release_wake_up(&nfl->nfs_uuid, RCU_INITIALIZER(NULL));
}
/* Remove client from nn->local_clients */
--
2.44.0
next prev parent reply other threads:[~2025-08-05 23:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-05 23:20 [PATCH v7 00/11] NFS DIRECT: align misaligned DIO for LOCALIO Mike Snitzer
2025-08-05 23:20 ` [PATCH v7 01/11] NFS/localio: nfs_close_local_fh() fix check for file closed Mike Snitzer
2025-08-05 23:20 ` [PATCH v7 02/11] NFS/localio: nfs_uuid_put() fix races with nfs_open/close_local_fh() Mike Snitzer
2025-08-05 23:20 ` Mike Snitzer [this message]
2025-08-05 23:20 ` [PATCH v7 04/11] nfs/localio: avoid bouncing LOCALIO if nfs_client_is_local() Mike Snitzer
2025-08-05 23:21 ` [PATCH v7 05/11] nfs/localio: make trace_nfs_local_open_fh more useful Mike Snitzer
2025-08-05 23:21 ` [PATCH v7 06/11] nfs/localio: add nfsd_file_dio_alignment Mike Snitzer
2025-08-05 23:21 ` [PATCH v7 07/11] nfs/localio: refactor iocb initialization Mike Snitzer
2025-08-05 23:21 ` [PATCH v7 08/11] nfs/localio: fallback to NFSD for misaligned O_DIRECT READs Mike Snitzer
2025-08-05 23:21 ` [PATCH v7 09/11] nfs/direct: add misaligned READ handling Mike Snitzer
2025-08-05 23:21 ` [PATCH v7 10/11] nfs/direct: add misaligned WRITE handling Mike Snitzer
2025-08-05 23:21 ` [PATCH v7 11/11] NFS: add basic STATX_DIOALIGN and STATX_DIO_READ_ALIGN support Mike Snitzer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250805232106.8656-4-snitzer@kernel.org \
--to=snitzer@kernel.org \
--cc=anna.schumaker@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=trond.myklebust@hammerspace.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).