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:
Eric Sandeen 2013-03-04 16:49:40 -06:00 committed by David Sterba
parent b79d4a217f
commit c3d5897555
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}