]> git.hungrycats.org Git - linux/commit
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)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Fri, 23 Jan 2015 13:16:40 +0000 (08:16 -0500)
commitff5f8e4c4cd9d6e66200348f8bddcfabeef76e7c
tree37606d2715b446003bc1ea3a1bef35534b6f630e
parent709deb00a91d73dea126afd9920aaabc6e89d059
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>
(cherry picked from commit 40ae837b43565c47ee171e704d05947fd5c2bae9)
fs/btrfs/inode.c