From: Andreas Gruenbacher Date: Tue, 5 Jul 2011 16:26:00 +0000 (+0200) Subject: drbd: drbd_adm_new_resource(): Check if resource exists, not if it has any connections X-Git-Tag: v3.15-rc1~134^2~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5c6610422a9684d03c3cbb1b1b422c428bf712f5;p=thirdparty%2Fkernel%2Flinux.git drbd: drbd_adm_new_resource(): Check if resource exists, not if it has any connections Signed-off-by: Andreas Gruenbacher Signed-off-by: Philipp Reisner --- diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 6f11d85792631..fde2d257eb86f 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c @@ -3301,7 +3301,7 @@ int drbd_adm_new_resource(struct sk_buff *skb, struct genl_info *info) if (retcode != NO_ERROR) goto out; - if (adm_ctx.connection) { + if (adm_ctx.resource) { if (info->nlhdr->nlmsg_flags & NLM_F_EXCL) { retcode = ERR_INVALID_REQUEST; drbd_msg_put_info("resource exists");