Whamcloud - gitweb
LU-2910 clio: skip iov update when tot_nrsegs is zero
authorNiu Yawei <yawei.niu@intel.com>
Mon, 18 Mar 2013 03:08:48 +0000 (23:08 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 18 Mar 2013 21:29:21 +0000 (17:29 -0400)
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>
lustre/lclient/lcommon_cl.c

index cf8b568..0272c7f 100644 (file)
@@ -771,7 +771,7 @@ void ccc_io_update_iov(const struct lu_env *env,
         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++) {