]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
squashfs: fix locking bug in zlib wrapper
authorPhillip Lougher <phillip@lougher.demon.co.uk>
Sun, 4 Apr 2010 21:20:58 +0000 (22:20 +0100)
committerPhillip Lougher <phillip@lougher.demon.co.uk>
Fri, 23 Apr 2010 01:54:54 +0000 (02:54 +0100)
Fix locking bug in zlib wrapper introduced by recent decompressor changes.

Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
fs/squashfs/zlib_wrapper.c

index 15a03d0fb9f3a08d64bc85e7b53042757ad9c975..7a603874e483166022a58ee788d0877b99d4505f 100644 (file)
@@ -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);