[PATCH] fix deadlock when adopted volume goes away
- From: David Zeuthen <david fubar dk>
- To: Alexander Larsson <alexl redhat com>, nautilus-list gnome org
- Subject: [PATCH] fix deadlock when adopted volume goes away
- Date: Thu, 06 Mar 2008 02:53:21 -0500
Hi,
There's a deadlock in gvfs client code happening when I unplug a USB
device driven by the gphoto2 gvfs backend. The fix is pretty obvious;
avoid trying to get the same lock twice.
(Alex, for Fedora, would probably be good to get this into the Fedora
packages before the beta - probably you need to poke jeremy or jkeating
or IRC to make sure it gets in).
Thanks,
David
Index: client/gdaemonmount.c
===================================================================
--- client/gdaemonmount.c (revision 1569)
+++ client/gdaemonmount.c (working copy)
@@ -191,9 +191,14 @@
g_object_ref (daemon_mount);
if (daemon_mount->foreign_volume == volume)
- g_daemon_mount_set_foreign_volume (daemon_mount, NULL);
-
- G_UNLOCK (daemon_mount);
+ {
+ G_UNLOCK (daemon_mount);
+ g_daemon_mount_set_foreign_volume (daemon_mount, NULL);
+ }
+ else
+ {
+ G_UNLOCK (daemon_mount);
+ }
g_signal_emit_by_name (daemon_mount, "changed");
if (daemon_mount->volume_monitor != NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]