From aa8258e9fb887d45c0a5754f158015e035ce37bc Mon Sep 17 00:00:00 2001 From: Miklos Szeredi Date: Sat, 25 Feb 2006 14:42:03 +0000 Subject: fix --- lib/fuse.c | 2 +- lib/fuse_lowlevel.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/fuse.c b/lib/fuse.c index ac6a2d5..0b31233 100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -1331,6 +1331,7 @@ static void fuse_release(fuse_req_t req, fuse_ino_t ino, struct node *node; int unlink_hidden; + pthread_rwlock_rdlock(&f->tree_lock); pthread_mutex_lock(&f->lock); node = get_node(f, ino); assert(node->open_count > 0); @@ -1338,7 +1339,6 @@ static void fuse_release(fuse_req_t req, fuse_ino_t ino, unlink_hidden = (node->is_hidden && !node->open_count); pthread_mutex_unlock(&f->lock); - pthread_rwlock_rdlock(&f->tree_lock); path = get_path(f, ino); if (f->conf.debug) { printf("RELEASE[%llu] flags: 0x%x\n", (unsigned long long) fi->fh, diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index 12f6c82..8437eb4 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -653,8 +653,13 @@ static void do_statfs(fuse_req_t req) { if (req->f->op.statfs) req->f->op.statfs(req); - else - fuse_reply_err(req, ENOSYS); + else { + struct statvfs buf = { + .f_namemax = 255, + .f_bsize = 512, + }; + fuse_reply_statfs(req, &buf); + } } static void do_setxattr(fuse_req_t req, fuse_ino_t nodeid, -- cgit v1.2.3