+2006-02-16 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix rare race betweeen abort and release caused by failed iget()
+ in fuse_create_open().
+
2006-02-15 Miklos Szeredi <miklos@szeredi.hu>
* Work around FreeBSD runtime linker "feature" which binds an old
If './configure' cannot find the kernel source or it says the kernel
source should be prepared, you may either try
- ./configure--disable-kernel-module
+ ./configure --disable-kernel-module
or if your kernel does not already contain FUSE support, do the
following:
#endif
#endif
+/*
+ * Reset request, so that it can be reused
+ *
+ * The caller must be _very_ careful to make sure, that it is holding
+ * the only reference to req
+ */
void fuse_reset_request(struct fuse_req *req)
{
int preallocated = req->preallocated;
/* Special case for failed iget in CREATE */
static void fuse_release_end(struct fuse_conn *fc, struct fuse_req *req)
{
- u64 nodeid = req->in.h.nodeid;
- fuse_reset_request(req);
- fuse_send_forget(fc, req, nodeid, 1);
+ /* If called from end_io_requests(), req has more than one
+ reference and fuse_reset_request() cannot work */
+ if (fc->connected) {
+ u64 nodeid = req->in.h.nodeid;
+ fuse_reset_request(req);
+ fuse_send_forget(fc, req, nodeid, 1);
+ } else
+ fuse_put_request(fc, req);
}
void fuse_send_release(struct fuse_conn *fc, struct fuse_file *ff,