mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
drbd: Fix for a race between IO and a detach operation [Bugz 262]
In D_DISKLESS we do not hand out any new references to ldev (local_cnt) therefore waiting until all previously handed out refereces got returned is sufficient before actually freeing mdev->ldev. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
This commit is contained in:
parent
0798219f61
commit
0a6dbf2bc4
1 changed files with 1 additions and 0 deletions
|
@ -1298,6 +1298,7 @@ static void after_state_ch(struct drbd_conf *mdev, union drbd_state os,
|
||||||
dev_err(DEV, "Sending state in drbd_io_error() failed\n");
|
dev_err(DEV, "Sending state in drbd_io_error() failed\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wait_event(mdev->misc_wait, !atomic_read(&mdev->local_cnt));
|
||||||
lc_destroy(mdev->resync);
|
lc_destroy(mdev->resync);
|
||||||
mdev->resync = NULL;
|
mdev->resync = NULL;
|
||||||
lc_destroy(mdev->act_log);
|
lc_destroy(mdev->act_log);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue