Skip to content

Commit

Permalink
md: fix double free of io_acct_set bioset
Browse files Browse the repository at this point in the history
Now io_acct_set is alloc and free in personality. Remove the codes that
free io_acct_set in md_free and md_stop.

Fixes: 0c031fd (md: Move alloc/free acct bioset in to personality)
Signed-off-by: Xiao Ni <xni@redhat.com>
Signed-off-by: Song Liu <song@kernel.org>
  • Loading branch information
Xiao Ni authored and Song Liu committed May 23, 2022
1 parent 0f2571a commit 42b805a
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -5585,8 +5585,6 @@ static void md_free(struct kobject *ko)

bioset_exit(&mddev->bio_set);
bioset_exit(&mddev->sync_set);
if (mddev->level != 1 && mddev->level != 10)
bioset_exit(&mddev->io_acct_set);
kfree(mddev);
}

Expand Down Expand Up @@ -6271,8 +6269,6 @@ void md_stop(struct mddev *mddev)
__md_stop(mddev);
bioset_exit(&mddev->bio_set);
bioset_exit(&mddev->sync_set);
if (mddev->level != 1 && mddev->level != 10)
bioset_exit(&mddev->io_acct_set);
}

EXPORT_SYMBOL_GPL(md_stop);
Expand Down

0 comments on commit 42b805a

Please sign in to comment.