From d8c6a652de9c8700891ce708d34fec58a46bcfb8 Mon Sep 17 00:00:00 2001 From: Niu Yawei Date: Sun, 17 Mar 2013 23:08:48 -0400 Subject: [PATCH] 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 --- lustre/lclient/lcommon_cl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) { -- 1.8.3.1