diff options
Diffstat (limited to 'xlators/features')
-rw-r--r-- | xlators/features/marker/src/marker.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index a40755149f5..93b1518cb7e 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -65,6 +65,7 @@ marker_loc_fill (loc_t *loc, inode_t *inode, inode_t *parent, char *path) if (inode) { loc->inode = inode_ref (inode); + uuid_copy (loc->gfid, loc->inode->gfid); } if (parent) @@ -94,34 +95,25 @@ int marker_inode_loc_fill (inode_t *inode, loc_t *loc) { char *resolvedpath = NULL; - inode_t *parent = NULL; int ret = -1; + inode_t *parent = NULL; if ((!inode) || (!loc)) return ret; - if ((inode) && __is_root_gfid (inode->gfid)) { - loc->parent = NULL; - goto ignore_parent; - } + parent = inode_parent (inode, NULL, NULL); - parent = inode_parent (inode, 0, NULL); - if (!parent) { - goto err; - } - -ignore_parent: ret = inode_path (inode, NULL, &resolvedpath); if (ret < 0) goto err; - ret = marker_loc_fill (loc, inode, parent, resolvedpath); + ret = marker_loc_fill (loc, inode, NULL, resolvedpath); if (ret < 0) goto err; err: - if (parent) - inode_unref (parent); + if (parent) + inode_unref (parent); if (resolvedpath) GF_FREE (resolvedpath); |