If pthread_mutex_lock() fails it returns the error in ret,
and does not set errno.
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
diff --git a/cmds-scrub.c b/cmds-scrub.c
index f73b3c6..8129601 100644
--- a/cmds-scrub.c
+++ b/cmds-scrub.c
@@ -763,7 +763,7 @@ static int scrub_write_progress(pthread_mutex_t *m, const char *fsid,
ret = pthread_mutex_lock(m);
if (ret) {
- err = -errno;
+ err = -ret;
goto out;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html