+2006-11-11 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Print an error if an incompatible kernel interface version is
+ detected in INIT. This will only show if filesystem is started
+ with -d or -f
+
+ * Fix order of fuse_destroy()/fuse_unmount() in error cleanup of
+ fuse_setup_common(). Reported by Szakacsits Szabolcs
+
+2006-11-06 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix recursive locking in fuse_create(). Thanks to Takuya
+ Ishibashi for the bug report
+
2006-10-28 Miklos Szeredi <miklos@szeredi.hu>
* Fix automake problem. Patch from Nix
/**
* Destroy the FUSE handle.
*
- * The filesystem is not unmounted.
+ * The communication channel attached to the handle is also destroyed.
+ *
+ * NOTE: This function does not unmount the filesystem. If this is
+ * needed, call fuse_unmount() before calling this function.
*
* @param f the FUSE handle
*/
/* The open syscall was interrupted, so it must be cancelled */
if(f->op.release)
fuse_do_release(f, req, path, fi);
+ pthread_mutex_unlock(&f->lock);
forget_node(f, e.ino, 1);
} else {
struct node *node = get_node(f, e.ino);
node->open_count ++;
+ pthread_mutex_unlock(&f->lock);
}
- pthread_mutex_unlock(&f->lock);
} else
reply_err(req, err);
f->conn.proto_major = arg->major;
f->conn.proto_minor = arg->minor;
+ if (arg->major < 7) {
+ fprintf(stderr, "fuse: unsupported protocol version: %u.%u\n",
+ arg->major, arg->minor);
+ fuse_reply_err(req, EPROTO);
+ return;
+ }
+
if (arg->major > 7 || (arg->major == 7 && arg->minor >= 6)) {
if (f->conn.async_read)
f->conn.async_read = arg->flags & FUSE_ASYNC_READ;
res = fuse_daemonize(foreground);
if (res == -1)
- goto err_destroy;
+ goto err_unmount;
res = fuse_set_signal_handlers(fuse_get_session(fuse));
if (res == -1)
- goto err_destroy;
+ goto err_unmount;
if (fd)
*fd = fuse_chan_fd(ch);
return fuse;
- err_destroy:
- fuse_destroy(fuse);
err_unmount:
fuse_unmount_common(*mountpoint, ch);
+ if (fuse)
+ fuse_destroy(fuse);
err_free:
free(*mountpoint);
return NULL;