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: NJiri Slaby <jirislaby@gmail.com> Signed-off-by: NNeilBrown <neilb@suse.de>
Showing
想要评论请 注册 或 登录