Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755652AbcC3Xw0 (ORCPT ); Wed, 30 Mar 2016 19:52:26 -0400 Received: from linuxhacker.ru ([217.76.32.60]:43224 "EHLO fiona.linuxhacker.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755544AbcC3XvG (ORCPT ); Wed, 30 Mar 2016 19:51:06 -0400 From: green@linuxhacker.ru To: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger Cc: Linux Kernel Mailing List , Lustre Development List , Niu Yawei , Oleg Drokin Subject: [PATCH v2 42/46] staging/lustre/ldlm: revert changes to ldlm_cancel_aged_policy() Date: Wed, 30 Mar 2016 19:49:03 -0400 Message-Id: <1459381747-2886687-43-git-send-email-green@linuxhacker.ru> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1459381747-2886687-1-git-send-email-green@linuxhacker.ru> References: <1459381747-2886687-1-git-send-email-green@linuxhacker.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1294 Lines: 35 From: Niu Yawei The changes to ldlm_cancel_aged_policy() introduced from LU-4300 was incorrect. This patch revert this part of changes. Signed-off-by: Niu Yawei Reviewed-on: http://review.whamcloud.com/12448 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5727 Reviewed-by: Bobi Jam Reviewed-by: Jinshan Xiong Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c index 2f12194..48e9828 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c @@ -1240,10 +1240,8 @@ static ldlm_policy_res_t ldlm_cancel_aged_policy(struct ldlm_namespace *ns, int unused, int added, int count) { - if (added >= count) - return LDLM_POLICY_KEEP_LOCK; - - if (time_before(cfs_time_current(), + if ((added >= count) && + time_before(cfs_time_current(), cfs_time_add(lock->l_last_used, ns->ns_max_age))) return LDLM_POLICY_KEEP_LOCK; -- 2.1.0