diff options
author | Eric Sandeen <sandeen@redhat.com> | 2013-03-04 16:49:40 -0600 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-03-10 16:06:37 +0100 |
commit | c3d58975558495030d729712929c8f509df432e8 (patch) | |
tree | 4e96b50b3a114889022ae03a1c287327c3743a7f | |
parent | b79d4a217fe8501431dcc0d956ed58a93b05565f (diff) |
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>
-rw-r--r-- | cmds-scrub.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-scrub.c b/cmds-scrub.c index 91ace9ce..b0fcde69 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; } |