Skip to content

Commit e144d53

Browse files
author
Trond Myklebust
committed
NFS/localio: nfs_close_local_fh() fix check for file closed
If the struct nfs_file_localio is closed, its list entry will be empty, but the nfs_uuid->files list might still contain other entries. Acked-by: Mike Snitzer <snitzer@kernel.org> Tested-by: Mike Snitzer <snitzer@kernel.org> Reviewed-by: NeilBrown <neil@brown.name> Fixes: 21fb440 ("nfs_localio: protect race between nfs_uuid_put() and nfs_close_local_fh()") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
1 parent b9defd6 commit e144d53

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/nfs_common/nfslocalio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ void nfs_close_local_fh(struct nfs_file_localio *nfl)
314314
rcu_read_unlock();
315315
return;
316316
}
317-
if (list_empty(&nfs_uuid->files)) {
317+
if (list_empty(&nfl->list)) {
318318
/* nfs_uuid_put() has started closing files, wait for it
319319
* to finished
320320
*/

0 commit comments

Comments
 (0)