Whamcloud - gitweb
LU-6138 lfsck: NOT hold reference on pre-loaded object
[fs/lustre-release.git] / lustre / quota / qmt_handler.c
index 6e2a3ff..2a1bae8 100644 (file)
@@ -643,13 +643,13 @@ static int qmt_dqacq(const struct lu_env *env, struct lu_device *ld,
                        RETURN(-ENOLCK);
                }
 
-               if ((lock->l_flags & LDLM_FL_AST_SENT) != 0) {
+               if (ldlm_is_ast_sent(lock)) {
                        struct ptlrpc_service_part      *svc;
                        unsigned int                     timeout;
 
                        svc = req->rq_rqbd->rqbd_svcpt;
                        timeout = at_est2timeout(at_get(&svc->scp_at_estimate));
-                       timeout = max(timeout, ldlm_timeout);
+                       timeout += (ldlm_bl_timeout(lock) >> 1);
 
                        /* lock is being cancelled, prolong timeout */
                        ldlm_refresh_waiting_lock(lock, timeout);