diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/drbd/drbd_nl.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/block/drbd/drbd_nl.c b/drivers/block/drbd/drbd_nl.c index 434b621f76a9..ffe3a97fef9b 100644 --- a/drivers/block/drbd/drbd_nl.c +++ b/drivers/block/drbd/drbd_nl.c | |||
@@ -1952,9 +1952,17 @@ static int drbd_nl_resume_sync(struct drbd_conf *mdev, struct drbd_nl_cfg_req *n | |||
1952 | struct drbd_nl_cfg_reply *reply) | 1952 | struct drbd_nl_cfg_reply *reply) |
1953 | { | 1953 | { |
1954 | int retcode = NO_ERROR; | 1954 | int retcode = NO_ERROR; |
1955 | union drbd_state s; | ||
1955 | 1956 | ||
1956 | if (drbd_request_state(mdev, NS(user_isp, 0)) == SS_NOTHING_TO_DO) | 1957 | if (drbd_request_state(mdev, NS(user_isp, 0)) == SS_NOTHING_TO_DO) { |
1957 | retcode = ERR_PAUSE_IS_CLEAR; | 1958 | s = mdev->state; |
1959 | if (s.conn == C_PAUSED_SYNC_S || s.conn == C_PAUSED_SYNC_T) { | ||
1960 | retcode = s.aftr_isp ? ERR_PIC_AFTER_DEP : | ||
1961 | s.peer_isp ? ERR_PIC_PEER_DEP : ERR_PAUSE_IS_CLEAR; | ||
1962 | } else { | ||
1963 | retcode = ERR_PAUSE_IS_CLEAR; | ||
1964 | } | ||
1965 | } | ||
1958 | 1966 | ||
1959 | reply->ret_code = retcode; | 1967 | reply->ret_code = retcode; |
1960 | return 0; | 1968 | return 0; |