aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Talbert <scott.talbert@hgst.com>2016-05-09 09:14:28 -0400
committerDavid Sterba <dsterba@suse.com>2016-05-16 04:17:58 -0400
commit4673272f43ae790ab9ec04e38a7542f82bb8f020 (patch)
tree136c03e4be575e4466ef9df119b8debdf768a56a
parent2c1984f244838477aab4e5882f4479491ae1084a (diff)
btrfs: fix memory leak during RAID 5/6 device replacement
A 'struct bio' is allocated in scrub_missing_raid56_pages(), but it was never freed anywhere. Signed-off-by: Scott Talbert <scott.talbert@hgst.com> Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r--fs/btrfs/scrub.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index d270c700ed31..fa35cdc46494 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -2127,6 +2127,8 @@ static void scrub_missing_raid56_end_io(struct bio *bio)
2127 if (bio->bi_error) 2127 if (bio->bi_error)
2128 sblock->no_io_error_seen = 0; 2128 sblock->no_io_error_seen = 0;
2129 2129
2130 bio_put(bio);
2131
2130 btrfs_queue_work(fs_info->scrub_workers, &sblock->work); 2132 btrfs_queue_work(fs_info->scrub_workers, &sblock->work);
2131} 2133}
2132 2134