When tot_nrsegs is zero, we should skip the iov update too.
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I52d4d52a65802f3967dd6a96ad46ec40fd4ef355
Reviewed-on: http://review.whamcloud.com/5747
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
size_t size = io->u.ci_rw.crw_count;
cio->cui_iov_olen = 0;
- if (!cl_is_normalio(env, io))
+ if (!cl_is_normalio(env, io) || cio->cui_tot_nrsegs == 0)
return;
for (i = 0; i < cio->cui_tot_nrsegs; i++) {