Btrfs: don't leak pages and memory on compressed write error
authorFilipe Manana <fdmanana@suse.com>
Mon, 6 Oct 2014 21:14:24 +0000 (22:14 +0100)
committerChris Mason <clm@fb.com>
Fri, 21 Nov 2014 01:14:26 +0000 (17:14 -0800)
commit40ae837b43565c47ee171e704d05947fd5c2bae9
tree520debe05ef897cfd6a1031ff16033d82c9eb8e2
parentfce2a4e6b2da1bcc03837aff53b5bcb02bee4cee
Btrfs: don't leak pages and memory on compressed write error

In inode.c:submit_compressed_extents(), if we fail before calling
btrfs_submit_compressed_write(), or when that function fails, we
were freeing the async_extent structure without releasing its pages
and freeing the pages array.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/inode.c