From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754896AbbBBCxa (ORCPT ); Sun, 1 Feb 2015 21:53:30 -0500 Received: from linuxhacker.ru ([217.76.32.60]:59821 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1755282AbbBBCxQ (ORCPT ); Sun, 1 Feb 2015 21:53:16 -0500 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Dmitry Eremin , Oleg Drokin Subject: [PATCH 12/20] staging/lustre/obd: change type of cl_conn_count to size_t Date: Sun, 1 Feb 2015 21:52:11 -0500 Message-Id: <1422845539-26742-13-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1422845539-26742-1-git-send-email-green@linuxhacker.ru> References: <1422845539-26742-1-git-send-email-green@linuxhacker.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Eremin Change type of cl_conn_count to size_t. Signed-off-by: Dmitry Eremin Reviewed-on: http://review.whamcloud.com/13125 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577 Reviewed-by: James Simmons Reviewed-by: John L. Hammond Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 6 +++--- drivers/staging/lustre/lustre/mgc/mgc_request.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index 2a88b80..7cbc378 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -312,7 +312,7 @@ struct client_obd { struct rw_semaphore cl_sem; struct obd_uuid cl_target_uuid; struct obd_import *cl_import; /* ptlrpc connection state */ - int cl_conn_count; + size_t cl_conn_count; /* max_mds_easize is purely a performance thing so we don't have to * call obd_size_diskmd() all the time. */ int cl_default_mds_easize; diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c index c5c86e7..e1586ef 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c @@ -571,10 +571,10 @@ int client_disconnect_export(struct obd_export *exp) imp = cli->cl_import; down_write(&cli->cl_sem); - CDEBUG(D_INFO, "disconnect %s - %d\n", obd->obd_name, + CDEBUG(D_INFO, "disconnect %s - %zu\n", obd->obd_name, cli->cl_conn_count); - if (!cli->cl_conn_count) { + if (cli->cl_conn_count == 0) { CERROR("disconnecting disconnected device (%s)\n", obd->obd_name); rc = -EINVAL; @@ -582,7 +582,7 @@ int client_disconnect_export(struct obd_export *exp) } cli->cl_conn_count--; - if (cli->cl_conn_count) { + if (cli->cl_conn_count != 0) { rc = 0; goto out_disconnect; } diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c index 60d2b0f..5124112 100644 --- a/drivers/staging/lustre/lustre/mgc/mgc_request.c +++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c @@ -790,8 +790,8 @@ static int mgc_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, } /* Make sure not to re-enqueue when the mgc is stopping (we get called from client_disconnect_export) */ - if (!lock->l_conn_export || - !lock->l_conn_export->exp_obd->u.cli.cl_conn_count) { + if (lock->l_conn_export == NULL || + lock->l_conn_export->exp_obd->u.cli.cl_conn_count == 0) { CDEBUG(D_MGC, "log %.8s: disconnecting, won't requeue\n", cld->cld_logname); config_log_put(cld); -- 2.1.0