hash value should be fetched only once we've got a record.
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Change-Id: If02a5ba0c85c0230dea799445a8b985ed1a6fbae
Reviewed-on: http://review.whamcloud.com/9218
Tested-by: Jenkins
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LASSERT(lde);
- lde->lde_hash = cpu_to_le64(udmu_zap_cursor_serialize(it->ozi_zc));
-
- if ((rc = -zap_cursor_retrieve(it->ozi_zc, za)))
+ rc = -zap_cursor_retrieve(it->ozi_zc, za);
+ if (unlikely(rc != 0))
GOTO(out, rc);
+ lde->lde_hash = cpu_to_le64(udmu_zap_cursor_serialize(it->ozi_zc));
namelen = strlen(za->za_name);
if (namelen > NAME_MAX)
GOTO(out, rc = -EOVERFLOW);