[GNOME VFS] patch for #84910

Michael Meeks <[email protected]>
Newsgroups gmane.comp.gnome.vfs
Message-ID <[email protected]>
Hi guys,

	This patch nails the deadlock in the above bug.

	May I commit to gnome-2-0 and HEAD

	Regards,

		Michael.

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-vfs/ChangeLog,v
retrieving revision 1.1334.2.10
diff -u -p -u -r1.1334.2.10 ChangeLog
--- ChangeLog	26 Jun 2002 18:48:16 -0000	1.1334.2.10
+++ ChangeLog	27 Jun 2002 17:44:48 -0000
@@ -1,3 +1,10 @@
+2002-06-27  Michael Meeks  <[email protected]>
+
+	* modules/vfolder-desktop-method.c
+	(try_free_file_monitors_create_files_unlocked): use
+	ensure_folder_unlocked to avoid deadlock.
+	(rescan_monitors): ditto.
+
 2002-06-25  Damon Chaplin  <[email protected]>
 
 	* libgnomevfs/gnome-vfs-async-job-map.c (gnome_vfs_async_job_map_init):
Index: modules/vfolder-desktop-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/vfolder-desktop-method.c,v
retrieving revision 1.50
diff -u -p -u -r1.50 vfolder-desktop-method.c
--- modules/vfolder-desktop-method.c	6 Jun 2002 22:09:45 -0000	1.50
+++ modules/vfolder-desktop-method.c	27 Jun 2002 17:44:50 -0000
@@ -2821,10 +2821,11 @@ try_free_file_monitors_create_files_unlo
 					    NULL);
 
 			if (f != NULL) {
-				ensure_folder (info, f,
-					       FALSE /* subfolders */,
-					       NULL /* except */,
-					       FALSE /* ignore_unallocated */);
+				ensure_folder_unlocked (
+					info, f,
+					FALSE /* subfolders */,
+					NULL /* except */,
+					FALSE /* ignore_unallocated */);
 				entry = find_entry (f->entries, vuri.file);
 			}
 
@@ -2875,7 +2876,7 @@ try_free_file_monitors_create_files_unlo
 	g_slist_free (list);
 }
 
-static void
+static void /* unlocked */
 rescan_monitors (VFolderInfo *info)
 {
 	GSList *li;
@@ -2945,10 +2946,11 @@ rescan_monitors (VFolderInfo *info)
 					    NULL);
 
 			if (f != NULL) {
-				ensure_folder (info, f,
-					       FALSE /* subfolders */,
-					       NULL /* except */,
-					       FALSE /* ignore_unallocated */);
+				ensure_folder_unlocked (
+					info, f,
+					FALSE /* subfolders */,
+					NULL /* except */,
+					FALSE /* ignore_unallocated */);
 				entry = find_entry (f->entries, vuri.file);
 			}
 
@@ -3000,7 +3002,7 @@ rescan_monitors (VFolderInfo *info)
 	try_free_file_monitors_create_files_unlocked (info);
 }
 
-static gboolean
+static gboolean /* unlocked */
 vfolder_info_read_items (VFolderInfo *info,
 			 GnomeVFSResult *result,
 			 GnomeVFSContext *context)

-- 
 [email protected]  <><, Pseudo Engineer, itinerant idiot


_______________________________________________
gnome-vfs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gnome-vfs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.