summaryrefslogtreecommitdiff
path: root/drivers/block/drbd/drbd_nl.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@linbit.com>2011-07-05 18:26:00 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2014-02-17 16:46:41 +0100
commit5c6610422a9684d03c3cbb1b1b422c428bf712f5 (patch)
tree5182246870573e36dcdcba2ee5c5611f545795ac /drivers/block/drbd/drbd_nl.c
parent251b8f8eafcb8f3d6c11b061d23eddf7c0723da7 (diff)
downloadlwn-5c6610422a9684d03c3cbb1b1b422c428bf712f5.tar.gz
lwn-5c6610422a9684d03c3cbb1b1b422c428bf712f5.zip
drbd: drbd_adm_new_resource(): Check if resource exists, not if it has any connections
Signed-off-by: Andreas Gruenbacher <agruen@linbit.com> Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_nl.c')
-rw-r--r--drivers/block/drbd/drbd_nl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c
index 6f11d8579263..fde2d257eb86 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");