diff options
Diffstat (limited to 'lib/fuse.c')
-rw-r--r--[-rwxr-xr-x] | lib/fuse.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/fuse.c b/lib/fuse.c index b0f5b30..a95d7c1 100755..100644 --- a/lib/fuse.c +++ b/lib/fuse.c @@ -3390,7 +3390,7 @@ static void fuse_lib_opendir(fuse_req_t req, fuse_ino_t ino, dh->len = 0; dh->filled = 0; dh->nodeid = ino; - fuse_mutex_init(&dh->lock); + pthread_mutex_init(&dh->lock, NULL); llfi->fh = (uintptr_t) dh; @@ -3566,7 +3566,7 @@ static int fill_dir_plus(void *dh_, const char *name, const struct stat *statp, return 1; } - if (off && statp && (flags & FUSE_FILL_DIR_PLUS)) { + if (statp && (flags & FUSE_FILL_DIR_PLUS)) { e.attr = *statp; if (!is_dot_or_dotdot(name)) { @@ -3578,6 +3578,11 @@ static int fill_dir_plus(void *dh_, const char *name, const struct stat *statp, } } else { e.attr.st_ino = FUSE_UNKNOWN_INO; + if (statp) { + e.attr.st_mode = statp->st_mode; + if (f->conf.use_ino) + e.attr.st_ino = statp->st_ino; + } if (!f->conf.use_ino && f->conf.readdir_ino) { e.attr.st_ino = (ino_t) lookup_nodeid(f, dh->nodeid, name); @@ -4533,7 +4538,7 @@ static int fuse_session_loop_remember(struct fuse *f) res = poll(&fds, 1, timeout * 1000); if (res == -1) { - if (errno == -EINTR) + if (errno == EINTR) continue; else break; @@ -4569,7 +4574,7 @@ int fuse_loop(struct fuse *f) return fuse_session_loop(f->se); } -FUSE_SYMVER(".symver fuse_loop_mt_32,fuse_loop_mt@@FUSE_3.2"); +FUSE_SYMVER("fuse_loop_mt_32", "fuse_loop_mt@@FUSE_3.2") int fuse_loop_mt_32(struct fuse *f, struct fuse_loop_config *config) { if (f == NULL) @@ -4585,7 +4590,7 @@ int fuse_loop_mt_32(struct fuse *f, struct fuse_loop_config *config) } int fuse_loop_mt_31(struct fuse *f, int clone_fd); -FUSE_SYMVER(".symver fuse_loop_mt_31,fuse_loop_mt@FUSE_3.0"); +FUSE_SYMVER("fuse_loop_mt_31", "fuse_loop_mt@FUSE_3.0") int fuse_loop_mt_31(struct fuse *f, int clone_fd) { struct fuse_loop_config config; @@ -4870,7 +4875,7 @@ void fuse_stop_cleanup_thread(struct fuse *f) } -FUSE_SYMVER(".symver fuse_new_31,fuse_new@@FUSE_3.1"); +FUSE_SYMVER("fuse_new_31", "fuse_new@@FUSE_3.1") struct fuse *fuse_new_31(struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data) @@ -4973,7 +4978,7 @@ struct fuse *fuse_new_31(struct fuse_args *args, if (node_table_init(&f->id_table) == -1) goto out_free_name_table; - fuse_mutex_init(&f->lock); + pthread_mutex_init(&f->lock, NULL); root = alloc_node(f); if (root == NULL) { @@ -5024,7 +5029,7 @@ out: /* Emulates 3.0-style fuse_new(), which processes --help */ struct fuse *fuse_new_30(struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *private_data); -FUSE_SYMVER(".symver fuse_new_30,fuse_new@FUSE_3.0"); +FUSE_SYMVER("fuse_new_30", "fuse_new@FUSE_3.0") struct fuse *fuse_new_30(struct fuse_args *args, const struct fuse_operations *op, size_t op_size, void *user_data) |