diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-07-06 10:07:52 +0000 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2005-07-06 10:07:52 +0000 |
commit | 340d21f346500a7e819cbb1fd70429b1acfac81a (patch) | |
tree | 6db4abf0b065500e9cd961ec11859dd2783a94df /lib | |
parent | 437d81187fe3aac243a4b47f4a967a195fe9f22a (diff) |
fix
Diffstat (limited to 'lib')
-rw-r--r-- | lib/fuse.c | 10 | ||||
-rw-r--r-- | lib/helper.c | 1 |
2 files changed, 4 insertions, 7 deletions
@@ -80,7 +80,7 @@ struct fuse_dirhandle { int filled; unsigned long fh; int error; - struct node *node; + nodeid_t nodeid; }; struct fuse_cmd { @@ -1596,11 +1596,7 @@ static void do_opendir(struct fuse *f, struct fuse_in_header *in, dh->contents = NULL; dh->len = 0; dh->filled = 0; - if (f->flags & FUSE_READDIR_INO) { - pthread_mutex_lock(&f->lock); - dh->node = get_node(f, in->nodeid); - pthread_mutex_unlock(&f->lock); - } + dh->nodeid = in->nodeid; mutex_init(&dh->lock); memset(&outarg, 0, sizeof(outarg)); @@ -1658,7 +1654,7 @@ static int fill_dir_common(struct fuse_dirhandle *dh, const char *name, if (dh->fuse->flags & FUSE_READDIR_INO) { struct node *node; pthread_mutex_lock(&dh->fuse->lock); - node = lookup_node(dh->fuse, dh->node->nodeid, name); + node = lookup_node(dh->fuse, dh->nodeid, name); if (node) ino = (ino_t) node->nodeid; pthread_mutex_unlock(&dh->fuse->lock); diff --git a/lib/helper.c b/lib/helper.c index af77c0f..460bea2 100644 --- a/lib/helper.c +++ b/lib/helper.c @@ -46,6 +46,7 @@ static void usage(const char *progname) " fsname=NAME set filesystem name in mtab\n" " use_ino let filesystem set inode numbers\n" " readdir_ino try to fill in d_ino in readdir\n" + " nonempty allow mounts over non-empty file/dir\n" ); } |