]> git.baikalelectronics.ru Git - kernel.git/commit
md: fix error path when duplicate name is found on md device creation.
authorNeilBrown <neilb@suse.de>
Wed, 1 Jul 2009 02:27:21 +0000 (12:27 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 1 Jul 2009 02:27:21 +0000 (12:27 +1000)
commit32557bc8125cb426c96cdd98c6cb01e3a305d68a
tree2aa6e6539342a28263417f6a2f2551d541e9ead9
parent9544311dc78a9759e1fa55035dcbf7fba139c88c
md: fix error path when duplicate name is found on md device creation.

When an md device is created by name (rather than number) we need to
check that the name is not already in use.  If this check finds a
duplicate, we return an error without dropping the lock or freeing
the newly create mddev.
This patch fixes that.

Cc: stable@kernel.org
Found-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c