Re: [PATCH 2/4] xfs_scrub: handle spurious wakeups in scan_fs_tree

Christoph Hellwig
2023-11-23T06:31:56Z

On Wed, Nov 22, 2023 at 03:07:54PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> 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.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>