libfuse: document deadlock avoidance for fuse_notify_inval_entry()
authorMiklos Szeredi <mszeredi@suse.cz>
Tue, 15 Jul 2014 09:57:37 +0000 (11:57 +0200)
committerMiklos Szeredi <mszeredi@suse.cz>
Tue, 22 Jul 2014 04:36:01 +0000 (06:36 +0200)
and fuse_notify_delete()

Reported by Han-Wen Nienhuys

ChangeLog
include/fuse_lowlevel.h

index 4c3d13621a75fca4b18d2ec4dd01aedb76e97e0b..b8ccda9760ddb70304289be43efd7446973cc198 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
 
 2014-07-15  Miklos Szeredi <miklos@szeredi.hu>
 
+       * libfuse: document deadlock avoidance for
+       fuse_notify_inval_entry() and fuse_notify_delete()
+
        * fusermount, libfuse: send value as unsigned in "user_id=" and
        "group_id=" options.  Uids/gids larger than 2147483647 would
        result in EINVAL when mounting the filesystem.  This also needs a
index 2036717f36cb4aa375b6f960cf09aeea4ca26bff..caf4020db990b8b4bb9a1a1b932f86bd99c72dcb 100644 (file)
@@ -1335,6 +1335,10 @@ int fuse_lowlevel_notify_inval_inode(struct fuse_chan *ch, fuse_ino_t ino,
  * Notify to invalidate parent attributes and the dentry matching
  * parent/name
  *
+ * To avoid a deadlock don't call this function from a filesystem operation and
+ * don't call it with a lock held that can also be held by a filesystem
+ * operation.
+ *
  * @param ch the channel through which to send the invalidation
  * @param parent inode number
  * @param name file name
@@ -1349,6 +1353,10 @@ int fuse_lowlevel_notify_inval_entry(struct fuse_chan *ch, fuse_ino_t parent,
  * parent/name if the dentry's inode number matches child (otherwise it
  * will invalidate the matching dentry).
  *
+ * To avoid a deadlock don't call this function from a filesystem operation and
+ * don't call it with a lock held that can also be held by a filesystem
+ * operation.
+ *
  * @param ch the channel through which to send the notification
  * @param parent inode number
  * @param child inode number