drbd: Fix for a race between IO and a detach operation [Bugz 262]
authorPhilipp Reisner <philipp.reisner@linbit.com>
Mon, 28 Dec 2009 15:58:38 +0000 (16:58 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Tue, 29 Dec 2009 16:36:40 +0000 (17:36 +0100)
commit0a6dbf2bc4ea3781c530f895e2d92fd3c4a735a2
tree0918d5f492e456f20dfb668a3d885cabc1257920
parent0798219f6154baa6a8efe767bfffb4a724e4b1e1
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>
drivers/block/drbd/drbd_main.c