Commit 7b2d26b0 authored by Niu Yawei's avatar Niu Yawei Committed by Greg Kroah-Hartman

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: default avatarNiu Yawei <yawei.niu@intel.com>
Reviewed-on: http://review.whamcloud.com/12448
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5727Reviewed-by: default avatarBobi Jam <bobijam@gmail.com>
Reviewed-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7d443334
...@@ -1240,10 +1240,8 @@ static ldlm_policy_res_t ldlm_cancel_aged_policy(struct ldlm_namespace *ns, ...@@ -1240,10 +1240,8 @@ static ldlm_policy_res_t ldlm_cancel_aged_policy(struct ldlm_namespace *ns,
int unused, int added, int unused, int added,
int count) int count)
{ {
if (added >= count) if ((added >= count) &&
return LDLM_POLICY_KEEP_LOCK; time_before(cfs_time_current(),
if (time_before(cfs_time_current(),
cfs_time_add(lock->l_last_used, ns->ns_max_age))) cfs_time_add(lock->l_last_used, ns->ns_max_age)))
return LDLM_POLICY_KEEP_LOCK; return LDLM_POLICY_KEEP_LOCK;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment