summaryrefslogtreecommitdiffstats
path: root/api/src
diff options
context:
space:
mode:
Diffstat (limited to 'api/src')
-rw-r--r--api/src/glfs-resolve.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
index e3f14f9a364..7aa5cc6158e 100644
--- a/api/src/glfs-resolve.c
+++ b/api/src/glfs-resolve.c
@@ -246,12 +246,10 @@ glfs_resolve_component (struct glfs *fs, xlator_t *subvol, inode_t *parent,
Fill loc.name so that we make use md-cache.
md-cache is not valid for nameless lookups.
*/
- if (__is_root_gfid (parent->gfid)) {
- if ((strcmp (component, ".") == 0) ||
- (strcmp (component, "..") == 0)) {
- loc.inode = inode_ref (parent);
- loc.name = ".";
- }
+ if (__is_root_gfid (parent->gfid) &&
+ (strcmp (component, "..") == 0)) {
+ loc.inode = inode_ref (parent);
+ loc.name = ".";
} else {
if (strcmp (component, ".") == 0)
loc.inode = inode_ref (parent);