Skip to content

Commit 4ec752c

Browse files
author
Trond Myklebust
committed
NFS/localio: nfs_uuid_put() fix the wake up after unlinking the file
Use store_release_wake_up() instead of wake_up_var_locked(), because the waiter cannot retake the nfs_uuid->lock. Acked-by: Mike Snitzer <[email protected]> Tested-by: Mike Snitzer <[email protected]> Suggested-by: NeilBrown <[email protected]> Link: https://lore.kernel.org/all/[email protected]/ Fixes: 21fb440 ("nfs_localio: protect race between nfs_uuid_put() and nfs_close_local_fh()") Signed-off-by: Trond Myklebust <[email protected]>
1 parent fdd015d commit 4ec752c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/nfs_common/nfslocalio.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,7 @@ static bool nfs_uuid_put(nfs_uuid_t *nfs_uuid)
198198
/* Now we can allow racing nfs_close_local_fh() to
199199
* skip the locking.
200200
*/
201-
RCU_INIT_POINTER(nfl->nfs_uuid, NULL);
202-
wake_up_var_locked(&nfl->nfs_uuid, &nfs_uuid->lock);
201+
store_release_wake_up(&nfl->nfs_uuid, RCU_INITIALIZER(NULL));
203202
}
204203

205204
/* Remove client from nn->local_clients */

0 commit comments

Comments
 (0)