From 4760abc45b7f01aa6f0c867b55b1bbfc6164be5f Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 6 Jul 2011 08:38:37 +0000 Subject: mnt/fuse: generate uuids in fuse_lookup, not in fuse_lookup_resume. Signed-off-by: Raghavendra G Signed-off-by: Anand Avati BUG: 3041 ([glusterfs-3.1.5qa2]: stat gives EINVAL) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3041 --- xlators/mount/fuse/src/fuse-bridge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index 8ab8f8262e6..73a11f8c5ed 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -251,7 +251,6 @@ fuse_lookup_resume (fuse_state_t *state) gf_log ("glusterfs-fuse", GF_LOG_TRACE, "%"PRIu64": LOOKUP %s", state->finh->unique, state->loc.path); - uuid_generate (state->gfid); state->loc.inode = inode_new (state->loc.parent->table); } @@ -280,6 +279,8 @@ fuse_lookup (xlator_t *this, fuse_in_header_t *finh, void *msg) if (state->loc.inode) { uuid_copy (state->resolve.gfid, state->loc.inode->gfid); + } else { + uuid_generate (state->gfid); } uuid_copy (state->resolve.pargfid, state->loc.parent->gfid); -- cgit