From 6936a19b9c2e6b8c2a9ccff1357d07ba86008510 Mon Sep 17 00:00:00 2001 From: James Simmons Date: Thu, 13 Oct 2016 19:13:58 -0400 Subject: [PATCH] LU-6303 osc: remove handling cl_avail_grant less than zero Earlier cl_avail_grant was changed to an unsigned int. Juila Lawall reported for the upstream client the following which affects the Intel branch as well: drivers/staging/lustre/lustre/osc/osc_request.c:1045:5-24: WARNING: Unsigned expression compared with zero: cli -> cl_avail_grant < 0 Since cl_avail_grant can never be negative we can remove the code handling the negative value case. Change-Id: I10f7ac3aaab7ebf03a7f7ac0717b60134f09cddf Signed-off-by: James Simmons Reviewed-on: http://review.whamcloud.com/23155 Reviewed-by: Fan Yong Tested-by: Jenkins Reviewed-by: Frank Zago Tested-by: Maloo Reviewed-by: John L. Hammond Reviewed-by: Dmitry Eremin Reviewed-by: Oleg Drokin --- lustre/osc/osc_request.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index f7382ec..fb3657e 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -922,15 +922,6 @@ static void osc_init_grant(struct client_obd *cli, struct obd_connect_data *ocd) cli->cl_dirty_pages << PAGE_SHIFT; } - if (cli->cl_avail_grant < 0) { - CWARN("%s: available grant < 0: avail/ocd/dirty %ld/%u/%ld\n", - cli_name(cli), cli->cl_avail_grant, - ocd->ocd_grant, cli->cl_dirty_pages << PAGE_SHIFT); - /* workaround for servers which do not have the patch from - * LU-2679 */ - cli->cl_avail_grant = ocd->ocd_grant; - } - if (OCD_HAS_FLAG(ocd, GRANT_PARAM)) { u64 size; int chunk_mask; -- 1.8.3.1