Message ID | 156774085609.2643257.18220893434559330906.stgit@magnolia (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | xfs_scrub: fix bugs in vfs tree walk code | expand |
diff --git a/scrub/vfs.c b/scrub/vfs.c index f8bc98c0..1a1482dd 100644 --- a/scrub/vfs.c +++ b/scrub/vfs.c @@ -246,7 +246,8 @@ scan_fs_tree( * about to tear everything down. */ pthread_mutex_lock(&sft.lock); - pthread_cond_wait(&sft.wakeup, &sft.lock); + if (sft.nr_dirs) + pthread_cond_wait(&sft.wakeup, &sft.lock); assert(sft.nr_dirs == 0); pthread_mutex_unlock(&sft.lock);