]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_scrub: handle spurious wakeups in scan_fs_tree
authorDarrick J. Wong <djwong@kernel.org>
Wed, 20 Dec 2023 16:53:46 +0000 (08:53 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 22 Dec 2023 02:29:14 +0000 (18:29 -0800)
commit817d1b67b6da0a1e2ac94c73ac12fcdb10be1d1e
tree9f0798b860e85f9506841366fec3b1cd62d8d117
parent9de9b74046527423dfd4a5140e86d74af69ee895
xfs_scrub: handle spurious wakeups in scan_fs_tree

Coverity reminded me that the pthread_cond_wait can wake up and return
without the predicate variable (sft.nr_dirs > 0) actually changing.
Therefore, one has to retest the condition after each wakeup.

Coverity-id: 1554280
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
scrub/vfs.c