Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251281
b: refs/heads/master
c: 9a0d9d0
h: refs/heads/master
i:
  251279: ac3f2d2
v: v3
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed May 24, 2011
1 parent 42ea323 commit a749b16
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 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: 99432fcc528d7a5ac8494a4c07ad4726670c96e2
refs/heads/master: 9a0d9d0389ef769e4b01abf50fcc11407706270b
4 changes: 4 additions & 0 deletions trunk/drivers/block/drbd/drbd_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -2157,6 +2157,10 @@ static inline int get_net_conf(struct drbd_conf *mdev)
static inline void put_ldev(struct drbd_conf *mdev)
{
int i = atomic_dec_return(&mdev->local_cnt);

/* This may be called from some endio handler,
* so we must not sleep here. */

__release(local);
D_ASSERT(i >= 0);
if (i == 0) {
Expand Down
14 changes: 11 additions & 3 deletions trunk/drivers/block/drbd/drbd_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1334,11 +1334,19 @@ static int drbd_nl_disk_conf(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp
static int drbd_nl_detach(struct drbd_conf *mdev, struct drbd_nl_cfg_req *nlp,
struct drbd_nl_cfg_reply *reply)
{
enum drbd_ret_code retcode;
int ret;
drbd_suspend_io(mdev); /* so no-one is stuck in drbd_al_begin_io */
reply->ret_code = drbd_request_state(mdev, NS(disk, D_DISKLESS));
if (mdev->state.disk == D_DISKLESS)
wait_event(mdev->misc_wait, !atomic_read(&mdev->local_cnt));
retcode = drbd_request_state(mdev, NS(disk, D_FAILED));
/* D_FAILED will transition to DISKLESS. */
ret = wait_event_interruptible(mdev->misc_wait,
mdev->state.disk != D_FAILED);
drbd_resume_io(mdev);
if (retcode == SS_IS_DISKLESS)
retcode = SS_NOTHING_TO_DO;
if (ret)
retcode = ERR_INTR;
reply->ret_code = retcode;
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/drbd.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@


extern const char *drbd_buildtag(void);
#define REL_VERSION "8.3.10"
#define REL_VERSION "8.3.11"
#define API_VERSION 88
#define PRO_VERSION_MIN 86
#define PRO_VERSION_MAX 96
Expand Down

0 comments on commit a749b16

Please sign in to comment.