summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/protocol/client/src/client-common.c')
-rw-r--r--xlators/protocol/client/src/client-common.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/protocol/client/src/client-common.c b/xlators/protocol/client/src/client-common.c
index 3d83bc94f59..51c2d95ea2b 100644
--- a/xlators/protocol/client/src/client-common.c
+++ b/xlators/protocol/client/src/client-common.c
@@ -1829,8 +1829,12 @@ int
client_post_lookup (xlator_t *this, gfs3_lookup_rsp *rsp, struct iatt *stbuf,
struct iatt *postparent, dict_t **xdata)
{
- gf_stat_to_iatt (&rsp->postparent, postparent);
- gf_stat_to_iatt (&rsp->stat, stbuf);
+
+ if (-1 != rsp->op_ret) {
+ gf_stat_to_iatt (&rsp->postparent, postparent);
+ gf_stat_to_iatt (&rsp->stat, stbuf);
+ }
+
GF_PROTOCOL_DICT_UNSERIALIZE (this, *xdata, (rsp->xdata.xdata_val),
(rsp->xdata.xdata_len), rsp->op_ret,
rsp->op_errno, out);