From: Niu Yawei Date: Mon, 18 Mar 2013 03:08:48 +0000 (-0400) Subject: LU-2910 clio: skip iov update when tot_nrsegs is zero X-Git-Tag: 2.3.63~47 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=d8c6a652de9c8700891ce708d34fec58a46bcfb8 LU-2910 clio: skip iov update when tot_nrsegs is zero When tot_nrsegs is zero, we should skip the iov update too. Signed-off-by: Niu Yawei Change-Id: I52d4d52a65802f3967dd6a96ad46ec40fd4ef355 Reviewed-on: http://review.whamcloud.com/5747 Tested-by: Hudson Reviewed-by: Bobi Jam Reviewed-by: Andreas Dilger Tested-by: Maloo Reviewed-by: Jinshan Xiong Reviewed-by: Oleg Drokin --- diff --git a/lustre/lclient/lcommon_cl.c b/lustre/lclient/lcommon_cl.c index cf8b568..0272c7f 100644 --- a/lustre/lclient/lcommon_cl.c +++ b/lustre/lclient/lcommon_cl.c @@ -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++) {