-// SPDX-License-Identifier: GPL-2.0+
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
- * Copyright (C) 2018 Oracle. All Rights Reserved.
- * Author: Darrick J. Wong <darrick.wong@oracle.com>
+ * Copyright (C) 2018-2024 Oracle. All Rights Reserved.
+ * Author: Darrick J. Wong <djwong@kernel.org>
*/
#include "xfs.h"
#include <stdint.h>
* about to tear everything down.
*/
pthread_mutex_lock(&sft.lock);
- if (sft.nr_dirs)
+ while (sft.nr_dirs > 0)
pthread_cond_wait(&sft.wakeup, &sft.lock);
assert(sft.nr_dirs == 0);
pthread_mutex_unlock(&sft.lock);