diff options
Diffstat (limited to 'xlators/features/gfid-access/src/gfid-access.c')
-rw-r--r-- | xlators/features/gfid-access/src/gfid-access.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xlators/features/gfid-access/src/gfid-access.c b/xlators/features/gfid-access/src/gfid-access.c index 52c137c342f..a5869f82187 100644 --- a/xlators/features/gfid-access/src/gfid-access.c +++ b/xlators/features/gfid-access/src/gfid-access.c @@ -313,8 +313,10 @@ ga_fill_tmp_loc (loc_t *loc, xlator_t *this, uuid_t gfid, new_loc->parent = inode_ref (parent); new_loc->inode = inode_grep (parent->table, parent, bname); - if (!new_loc->inode) + if (!new_loc->inode) { new_loc->inode = inode_new (parent->table); + uuid_copy (new_loc->inode->gfid, gfid); + } loc_path (new_loc, bname); if (new_loc->path) { @@ -434,6 +436,10 @@ ga_newentry_cbk (call_frame_t *frame, void *cookie, xlator_t *this, local = frame->local; + /* no need to proceed if things don't look good here */ + if (op_ret == -1) + goto done; + if (!local->uid && !local->gid) goto done; |