Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933091AbcDEMGS (ORCPT ); Tue, 5 Apr 2016 08:06:18 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:33937 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758255AbcDEMAL (ORCPT ); Tue, 5 Apr 2016 08:00:11 -0400 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Boaz Harrosh , Ming Lei , "Nicholas A. Bellinger" , linux-scsi@vger.kernel.org (open list:TARGET SUBSYSTEM), target-devel@vger.kernel.org (open list:TARGET SUBSYSTEM) Subject: [PATCH 09/27] target: use bio_is_full() Date: Tue, 5 Apr 2016 19:56:54 +0800 Message-Id: <1459857443-20611-10-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459857443-20611-1-git-send-email-tom.leiming@gmail.com> References: <1459857443-20611-1-git-send-email-tom.leiming@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 724 Lines: 20 Signed-off-by: Ming Lei --- drivers/target/target_core_pscsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c index de18790..24906c3 100644 --- a/drivers/target/target_core_pscsi.c +++ b/drivers/target/target_core_pscsi.c @@ -951,7 +951,7 @@ pscsi_map_sg(struct se_cmd *cmd, struct scatterlist *sgl, u32 sgl_nents, pr_debug("PSCSI: bio->bi_vcnt: %d nr_vecs: %d\n", bio->bi_vcnt, nr_vecs); - if (bio->bi_vcnt > nr_vecs) { + if (bio_is_full(bio)) { pr_debug("PSCSI: Reached bio->bi_vcnt max:" " %d i: %d bio: %p, allocating another" " bio\n", bio->bi_vcnt, i, bio); -- 1.9.1