aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_main.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2010-06-24 14:34:40 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2010-10-14 15:08:27 +0200
commitf70b3511599c49a3dc20ae349d6cdc5af47659df (patch)
tree1d5971f48f5fe95988df64f5ab1f22333c492dc9 /drivers/block/drbd/drbd_main.c
parent8f488156c0635dcc9c668737d05386113a745ef9 (diff)
downloadkernel_samsung_tuna-f70b3511599c49a3dc20ae349d6cdc5af47659df.zip
kernel_samsung_tuna-f70b3511599c49a3dc20ae349d6cdc5af47659df.tar.gz
kernel_samsung_tuna-f70b3511599c49a3dc20ae349d6cdc5af47659df.tar.bz2
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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 9fe9bdd..8d14635 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,
(os.user_isp && !ns.user_isp))
resume_next_sg(mdev);
+ /* free tl_hash if we Got thawed and are C_STANDALONE */
+ if (ns.conn == C_STANDALONE && ns.susp == 0 && mdev->tl_hash)
+ drbd_free_tl_hash(mdev);
+
/* Upon network connection, we need to start the receiver */
if (os.conn == C_STANDALONE && ns.conn == C_UNCONNECTED)
drbd_thread_start(&mdev->receiver);