+2007-02-02 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Fix regression caused by "Fix possible double lock in certain
+ cases if request is interrupted" on 2007-01-19. Reported by José
+ Antonio Sánchez
+
+2007-01-30 Miklos Szeredi <miklos@szeredi.hu>
+
+ * Released 2.6.2
+
2007-01-28 Miklos Szeredi <miklos@szeredi.hu>
* kernel: fix BUG in control filesystem if it is umounted and
int (*write) (const char *, const char *, size_t, off_t,
struct fuse_file_info *);
- /** Just a placeholder, don't set */
/** Get file system statistics
*
* The 'f_frsize', 'f_favail', 'f_fsid' and 'f_flag' fields are ignored
if (f->conf.kernel_cache)
fi->keep_cache = 1;
+ /* see comment for open */
+ pthread_mutex_lock(&f->lock);
if (fuse_reply_create(req, &e, fi) == -ENOENT) {
/* The open syscall was interrupted, so it must be cancelled */
+ pthread_mutex_unlock(&f->lock);
if(f->op.release)
fuse_do_release(f, req, path, fi);
forget_node(f, e.ino, 1);
} else {
- pthread_mutex_lock(&f->lock);
get_node(f, e.ino)->open_count++;
pthread_mutex_unlock(&f->lock);
}
if (f->conf.auto_cache)
open_auto_cache(f, req, ino, path, fi);
+ /* The reply and the open count increase needs to be under a
+ single locked section, otherwise a release could come in
+ between and screw up the accounting */
+ pthread_mutex_lock(&f->lock);
if (fuse_reply_open(req, fi) == -ENOENT) {
/* The open syscall was interrupted, so it must be cancelled */
+ pthread_mutex_unlock(&f->lock);
if(f->op.release && path != NULL)
fuse_compat_release(f, req, path, fi);
} else {
- pthread_mutex_lock(&f->lock);
get_node(f, ino)->open_count++;
pthread_mutex_unlock(&f->lock);
}