Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345863
b: refs/heads/master
c: 38f1961
h: refs/heads/master
i:
  345861: 77b0b1a
  345859: ad72ed5
  345855: 7dcdeb1
v: v3
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed Nov 3, 2012
1 parent f227e01 commit 7262f15
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cffec5b2fe8e851f54bb67a9012add062a97b960
refs/heads/master: 38f19616d2c6d4e0ab2de01e4c2f159cd5aa8b49
16 changes: 14 additions & 2 deletions trunk/drivers/block/drbd/drbd_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2590,8 +2590,11 @@ int drbd_adm_create_connection(struct sk_buff *skb, struct genl_info *info)
goto out;

if (adm_ctx.tconn) {
retcode = ERR_INVALID_REQUEST;
drbd_msg_put_info("connection exists");
if (info->nlhdr->nlmsg_flags & NLM_F_EXCL) {
retcode = ERR_INVALID_REQUEST;
drbd_msg_put_info("connection exists");
}
/* else: still NO_ERROR */
goto out;
}

Expand Down Expand Up @@ -2626,6 +2629,15 @@ int drbd_adm_add_minor(struct sk_buff *skb, struct genl_info *info)
goto out;
}

/* drbd_adm_prepare made sure already
* that mdev->tconn and mdev->vnr match the request. */
if (adm_ctx.mdev) {
if (info->nlhdr->nlmsg_flags & NLM_F_EXCL)
retcode = ERR_MINOR_EXISTS;
/* else: still NO_ERROR */
goto out;
}

retcode = conn_new_minor(adm_ctx.tconn, dh->minor, adm_ctx.volume);
out:
drbd_adm_finish(info, retcode);
Expand Down

0 comments on commit 7262f15

Please sign in to comment.