diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2014-09-28 19:52:51 +0100 |
---|---|---|
committer | Ross Lagerwall <rosslagerwall@gmail.com> | 2014-10-17 20:22:26 +0100 |
commit | 5904c6d9614b48311217faac66b4e2f57174ba9d (patch) | |
tree | 0b34bc872db510284c805d46ae13b9c6d33e2a53 /daemon/gvfsbackend.c | |
parent | e3fab1313117d8fefc98976b8c97d0f98cbb1819 (diff) | |
download | gvfs-5904c6d9614b48311217faac66b4e2f57174ba9d.tar.gz |
gvfsjobunmount: Block new requests before calling unmount() on a thread
Block new requests before calling unmount() on a separate thread to
prevent a race where new jobs are received and processed while the
unmount() is being executed.
This is not necessary for try_unmount() because all the job handling is
done on the same thread as the try_unmount() method and requests are
blocked when the try_unmount() method completes.
https://bugzilla.gnome.org/show_bug.cgi?id=710986
Diffstat (limited to 'daemon/gvfsbackend.c')
-rw-r--r-- | daemon/gvfsbackend.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/daemon/gvfsbackend.c b/daemon/gvfsbackend.c index a143498d..633d315e 100644 --- a/daemon/gvfsbackend.c +++ b/daemon/gvfsbackend.c @@ -590,9 +590,9 @@ g_vfs_backend_add_auto_info (GVfsBackend *backend, } void -g_vfs_backend_set_block_requests (GVfsBackend *backend) +g_vfs_backend_set_block_requests (GVfsBackend *backend, gboolean value) { - backend->priv->block_requests = TRUE; + backend->priv->block_requests = value; } gboolean @@ -1052,7 +1052,7 @@ forced_unregister_mount_callback (GVfsDBusMountTracker *proxy, void g_vfs_backend_force_unmount (GVfsBackend *backend) { - g_vfs_backend_set_block_requests (backend); + g_vfs_backend_set_block_requests (backend, TRUE); g_vfs_backend_unregister_mount (backend, (GAsyncReadyCallback) forced_unregister_mount_callback, backend); |