btrfs-progs: fix scrub error return from pthread_mutex_lock
If pthread_mutex_lock() fails it returns the error in ret, and does not set errno. Signed-off-by: Eric Sandeen <sandeen@redhat.com>
This commit is contained in:
parent
b79d4a217f
commit
c3d5897555
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue