ext4 crypto: fix memory leaks in ext4_encrypted_zeroout
authorTheodore Ts'o <tytso@google.com>
Fri, 29 May 2015 01:39:32 +0000 (21:39 -0400)
committerIan Chang <ianc@nvidia.com>
Wed, 1 Jun 2016 05:00:04 +0000 (13:00 +0800)
commit399a221bf058d913fe36aa3027b87395f28e9425
tree317028324f2f20ea58126940d2d85ca1a8640281
parent351855772b737733dff9ad5dcb6e9a1f4be50266
ext4 crypto: fix memory leaks in ext4_encrypted_zeroout

ext4_encrypted_zeroout() could end up leaking a bio and bounce page.
Fortunately it's not used much.  While we're fixing things up,
refactor out common code into the static function alloc_bounce_page().

Change-Id: I44023c01de7ec97ad43bfa85cd7d3b97b22ee0c0
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Theodore Ts'o <tytso@google.com>
fs/ext4/crypto.c