Skip to content

Commit 4673272

Browse files
Scott Talbertkdave
authored andcommitted
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 <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 2c1984f commit 4673272

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/btrfs/scrub.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2127,6 +2127,8 @@ static void scrub_missing_raid56_end_io(struct bio *bio)
21272127
if (bio->bi_error)
21282128
sblock->no_io_error_seen = 0;
21292129

2130+
bio_put(bio);
2131+
21302132
btrfs_queue_work(fs_info->scrub_workers, &sblock->work);
21312133
}
21322134

0 commit comments

Comments
 (0)