diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2010-06-24 08:34:40 -0400 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2010-10-14 09:08:27 -0400 |
commit | f70b3511599c49a3dc20ae349d6cdc5af47659df (patch) | |
tree | 1d5971f48f5fe95988df64f5ab1f22333c492dc9 /drivers/block/drbd/drbd_main.c | |
parent | 8f488156c0635dcc9c668737d05386113a745ef9 (diff) |
drbd: Do not try to free tl_hash in drbd_disconnect() when IO is suspended
We may not free tl_hash when IO is suspended, since we can not wait
until ap_bio_cnt reaches zero.
We can do this after susp reched 0, since then tl_clear was called
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_main.c')
-rw-r--r-- | drivers/block/drbd/drbd_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c index 9fe9bdd9e33d..8d14635e7faf 100644 --- a/drivers/block/drbd/drbd_main.c +++ b/drivers/block/drbd/drbd_main.c | |||
@@ -1409,6 +1409,10 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os, | |||
1409 | (os.user_isp && !ns.user_isp)) | 1409 | (os.user_isp && !ns.user_isp)) |
1410 | resume_next_sg(mdev); | 1410 | resume_next_sg(mdev); |
1411 | 1411 | ||
1412 | /* free tl_hash if we Got thawed and are C_STANDALONE */ | ||
1413 | if (ns.conn == C_STANDALONE && ns.susp == 0 && mdev->tl_hash) | ||
1414 | drbd_free_tl_hash(mdev); | ||
1415 | |||
1412 | /* Upon network connection, we need to start the receiver */ | 1416 | /* Upon network connection, we need to start the receiver */ |
1413 | if (os.conn == C_STANDALONE && ns.conn == C_UNCONNECTED) | 1417 | if (os.conn == C_STANDALONE && ns.conn == C_UNCONNECTED) |
1414 | drbd_thread_start(&mdev->receiver); | 1418 | drbd_thread_start(&mdev->receiver); |