md-cluster: fix potential lock issue in add_new_disk
authorGuoqing Jiang <gqjiang@suse.com>
Tue, 16 May 2017 06:01:25 +0000 (14:01 +0800)
committerShaohua Li <shli@fb.com>
Mon, 22 May 2017 03:37:09 +0000 (20:37 -0700)
commit2dffdc0724004f38f5e39907747b53e4b0d80e59
treef45ab141f5ca4b9f9ce3b8758393937e99a82597
parent08332893e37af6ae779367e78e444f8f9571511d
md-cluster: fix potential lock issue in add_new_disk

The add_new_disk returns with communication locked if
__sendmsg returns failure, fix it with call unlock_comm
before return.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
CC: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: Guoqing Jiang <gqjiang@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/md-cluster.c