Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 26ea8f92 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Jens Axboe
Browse files

drbd: Do not sleep inside rcu

parent f35546e0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1039,6 +1039,8 @@ randomize:
	rcu_read_lock();
	idr_for_each_entry(&tconn->volumes, mdev, vnr) {
		kref_get(&mdev->kref);
		rcu_read_unlock();

		/* Prevent a race between resync-handshake and
		 * being promoted to Primary.
		 *
@@ -1049,8 +1051,6 @@ randomize:
		mutex_lock(mdev->state_mutex);
		mutex_unlock(mdev->state_mutex);

		rcu_read_unlock();

		if (discard_my_data)
			set_bit(DISCARD_MY_DATA, &mdev->flags);
		else