lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun,  1 Feb 2015 21:52:11 -0500
From:	green@...uxhacker.ru
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	devel@...verdev.osuosl.org,
	Andreas Dilger <andreas.dilger@...el.com>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Dmitry Eremin <dmitry.eremin@...el.com>,
	Oleg Drokin <oleg.drokin@...el.com>
Subject: [PATCH 12/20] staging/lustre/obd: change type of cl_conn_count to size_t

From: Dmitry Eremin <dmitry.eremin@...el.com>

Change type of cl_conn_count to size_t.

Signed-off-by: Dmitry Eremin <dmitry.eremin@...el.com>
Reviewed-on: http://review.whamcloud.com/13125
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577
Reviewed-by: James Simmons <uja.ornl@...il.com>
Reviewed-by: John L. Hammond <john.hammond@...el.com>
Signed-off-by: Oleg Drokin <oleg.drokin@...el.com>
---
 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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ