+2004-06-23 Miklos Szeredi <mszeredi@inf.bme.hu>
+
+ * Fix locking bugs
+
2004-06-22 Miklos Szeredi <mszeredi@inf.bme.hu>
* No request allocation needed on inode and file release
{
req->issync = 0;
- spin_lock(&fuse_lock);
if (fc->file) {
+ spin_lock(&fuse_lock);
list_add_tail(&req->list, &fc->pending);
wake_up(&fc->waitq);
+ spin_unlock(&fuse_lock);
} else
fuse_put_request(fc, req);
- spin_unlock(&fuse_lock);
}
void request_send_nonblock(struct fuse_conn *fc, struct fuse_req *req,
/* Unlocks fuse_lock: */
request_end(fc, req);
spin_lock(&fuse_lock);
- } else
+ } else {
+ spin_unlock(&fuse_lock);
fuse_put_request(fc, req);
+ spin_lock(&fuse_lock);
+ }
}
}