[neon/backports-focal/xdg-desktop-portal/Neon/unstable] document-portal: document-fuse: Don't emit invalidation if we unmounted

Alexander Larsson null at kde.org
Wed Jan 13 06:32:42 GMT 2021


Git commit d3b071d6f9fe7b0ce240b077137af3d2d8e9cba5 by Alexander Larsson.
Committed on 02/04/2020 at 15:01.
Pushed by ash into branch 'Neon/unstable'.

document-fuse: Don't emit invalidation if we unmounted

M  +2    -1    document-portal/document-portal-fuse.c

https://invent.kde.org/neon/backports-focal/xdg-desktop-portal/commit/d3b071d6f9fe7b0ce240b077137af3d2d8e9cba5

diff --git a/document-portal/document-portal-fuse.c b/document-portal/document-portal-fuse.c
index 19b5642..3fe4310 100644
--- a/document-portal/document-portal-fuse.c
+++ b/document-portal/document-portal-fuse.c
@@ -1664,7 +1664,7 @@ invalidate_doc_domain (gpointer user_data)
 
   parent_ino = xdp_inode_to_ino (doc_domain->parent_inode);
 
-  if (g_atomic_int_get (&doc_domain->parent_inode->kernel_ref_count) > 0)
+  if (g_atomic_int_get (&doc_domain->parent_inode->kernel_ref_count) > 0 && main_ch != NULL)
     fuse_lowlevel_notify_inval_entry (main_ch, parent_ino, doc_domain->doc_id, strlen (doc_domain->doc_id));
 
   return FALSE;
@@ -3079,6 +3079,7 @@ xdp_fuse_mainloop (gpointer data)
   fuse_session_remove_chan (main_ch);
   fuse_session_destroy (session);
   fuse_unmount (mount_path, main_ch);
+  main_ch = NULL;
 
   return NULL;
 }



More information about the Neon-commits mailing list