Skip to content

Commit

Permalink
btrfs: fix memory leak during RAID 5/6 device replacement
Browse files Browse the repository at this point in the history
A 'struct bio' is allocated in scrub_missing_raid56_pages(), but it was never
freed anywhere.

Signed-off-by: Scott Talbert <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
Scott Talbert authored and kdave committed May 16, 2016
1 parent 2c1984f commit 4673272
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/btrfs/scrub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2127,6 +2127,8 @@ static void scrub_missing_raid56_end_io(struct bio *bio)
if (bio->bi_error)
sblock->no_io_error_seen = 0;

bio_put(bio);

btrfs_queue_work(fs_info->scrub_workers, &sblock->work);
}

Expand Down

0 comments on commit 4673272

Please sign in to comment.