md: make 'name' arg to md_register_thread non-optional.

Having the 'name' arg optional and defaulting to the current
personality name is no necessary and leads to errors, as when
changing the level of an array we can end up using the
name of the old level instead of the new one.

So make it non-optional and always explicitly pass the name
of the level that the array will be.

Reported-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
NeilBrown 2012-07-03 15:56:52 +10:00
parent 055d3747db
commit 0232605d98
5 changed files with 8 additions and 5 deletions

View file

@ -474,7 +474,8 @@ static int multipath_run (struct mddev *mddev)
}
{
mddev->thread = md_register_thread(multipathd, mddev, NULL);
mddev->thread = md_register_thread(multipathd, mddev,
"multipath");
if (!mddev->thread) {
printk(KERN_ERR "multipath: couldn't allocate thread"
" for %s\n", mdname(mddev));