Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345862
b: refs/heads/master
c: cffec5b
h: refs/heads/master
v: v3
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed Nov 3, 2012
1 parent 77b0b1a commit f227e01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: d0456c72df5fb3b800ba9b0ec2465fdbcaf29a7f
refs/heads/master: cffec5b2fe8e851f54bb67a9012add062a97b960
9 changes: 8 additions & 1 deletion trunk/drivers/block/drbd/drbd_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ static int drbd_adm_prepare(struct sk_buff *skb, struct genl_info *info,
drbd_msg_put_info("over-determined configuration context mismatch");
return ERR_INVALID_REQUEST;
}
if (adm_ctx.mdev && !adm_ctx.tconn)
adm_ctx.tconn = adm_ctx.mdev->tconn;
return NO_ERROR;

fail:
Expand Down Expand Up @@ -2643,10 +2645,15 @@ int drbd_adm_delete_minor(struct sk_buff *skb, struct genl_info *info)

mdev = adm_ctx.mdev;
if (mdev->state.disk == D_DISKLESS &&
mdev->state.conn == C_STANDALONE &&
/* no need to be mdev->state.conn == C_STANDALONE &&
* we may want to delete a minor from a live replication group.
*/
mdev->state.role == R_SECONDARY) {
drbd_delete_device(mdev_to_minor(mdev));
retcode = NO_ERROR;
/* if this was the last volume of this connection,
* this will terminate all threads */
conn_reconfig_done(adm_ctx.tconn);
} else
retcode = ERR_MINOR_CONFIGURED;
out:
Expand Down

0 comments on commit f227e01

Please sign in to comment.