summaryrefslogtreecommitdiffstats
path: root/api/src/glfs-resolve.c
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/glfs-resolve.c')
-rw-r--r--api/src/glfs-resolve.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c
index 9d8ea2c4553..7a7064c3aa2 100644
--- a/api/src/glfs-resolve.c
+++ b/api/src/glfs-resolve.c
@@ -129,6 +129,11 @@ glfs_refresh_inode_safe (xlator_t *subvol, inode_t *oldinode,
if (newinode == loc.inode)
inode_ctx_set (newinode, THIS, &ctx_value);
inode_lookup (newinode);
+ } else {
+ gf_msg (subvol->name, GF_LOG_WARNING, errno,
+ API_MSG_INODE_LINK_FAILED,
+ "inode linking of %s failed",
+ uuid_utoa ((unsigned char *)&iatt.ia_gfid));
}
loc_wipe (&loc);
@@ -341,7 +346,14 @@ glfs_resolve_component (struct glfs *fs, xlator_t *subvol, inode_t *parent,
goto out;
inode = inode_link (loc.inode, loc.parent, component, &ciatt);
- if (inode == loc.inode)
+
+ if (!inode) {
+ gf_msg (subvol->name, GF_LOG_WARNING, errno,
+ API_MSG_INODE_LINK_FAILED,
+ "inode linking of %s failed",
+ uuid_utoa ((unsigned char *)&ciatt.ia_gfid));
+ goto out;
+ } else if (inode == loc.inode)
inode_ctx_set (inode, THIS, &ctx_value);
found:
if (inode)