Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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-5727


Reviewed-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
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -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;