Skip to content

Commit

Permalink
squashfs: fix locking bug in zlib wrapper
Browse files Browse the repository at this point in the history
Fix locking bug in zlib wrapper introduced by recent decompressor changes.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
  • Loading branch information
Phillip Lougher committed Apr 23, 2010
1 parent 0d0fb0f commit 792590c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/squashfs/zlib_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ static int zlib_uncompress(struct squashfs_sb_info *msblk, void **buffer,
goto release_mutex;
}

length = stream->total_out;
mutex_unlock(&msblk->read_data_mutex);
return stream->total_out;
return length;

release_mutex:
mutex_unlock(&msblk->read_data_mutex);
Expand Down

0 comments on commit 792590c

Please sign in to comment.