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

Commit d7901554 authored by Carey Underwood's avatar Carey Underwood Committed by Chris Mason
Browse files

Btrfs: Release uuid_mutex for shrink during device delete



Device scanning waits on the uuid_mutex, which can result in a very long
wait if dev delete is shrinking the device.

Signed-off-by: default avatarCarey Underwood <cwillu@cwillu.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.cz>
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent b2aaaa3b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1562,7 +1562,9 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
		clear_super = true;
	}

	mutex_unlock(&uuid_mutex);
	ret = btrfs_shrink_device(device, 0);
	mutex_lock(&uuid_mutex);
	if (ret)
		goto error_undo;