aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiu Yawei <[email protected]>2016-03-30 19:49:03 -0400
committerGreg Kroah-Hartman <[email protected]>2016-03-30 21:38:13 -0700
commit7b2d26b0af8bcc44fb3a279f28f380010890c4a4 (patch)
treeaad7c1938a7195969f8032e36b14d4c8ed3ca0b6
parent7d44333467a949b6ea4e21b5fb7618f97cc10ce0 (diff)
staging/lustre/ldlm: revert changes to ldlm_cancel_aged_policy()
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 <[email protected]> Reviewed-on: http://review.whamcloud.com/12448 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5727 Reviewed-by: Bobi Jam <[email protected]> Reviewed-by: Jinshan Xiong <[email protected]> Reviewed-by: Andreas Dilger <[email protected]> Signed-off-by: Oleg Drokin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/lustre/lustre/ldlm/ldlm_request.c6
1 files 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 2f12194aa6df..48e982867db3 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;