[PATCH 12/20] staging/lustre/obd: change type of cl_conn_count to size_t
From: green
Date: Sun Feb 01 2015 - 21:53:33 EST
From: Dmitry Eremin <dmitry.eremin@xxxxxxxxx>
Change type of cl_conn_count to size_t.
Signed-off-by: Dmitry Eremin <dmitry.eremin@xxxxxxxxx>
Reviewed-on: http://review.whamcloud.com/13125
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577
Reviewed-by: James Simmons <uja.ornl@xxxxxxxxx>
Reviewed-by: John L. Hammond <john.hammond@xxxxxxxxx>
Signed-off-by: Oleg Drokin <oleg.drokin@xxxxxxxxx>
---
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/