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 <yawei.niu@intel.com> Reviewed-on: http://review.whamcloud.com/12448 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5727 Reviewed-by: Bobi Jam <bobijam@gmail.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7d44333467
commit
7b2d26b0af
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue