Whamcloud - gitweb
LU-5710 all: third batch of corrected typos and grammar errors
[fs/lustre-release.git] / lustre / quota / qmt_handler.c
index 44e32e9..a1f0f1b 100644 (file)
  * Author: Niu    Yawei    <yawei.niu@intel.com>
  */
 
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
 #define DEBUG_SUBSYSTEM S_LQUOTA
 
 #include <obd_class.h>
@@ -316,13 +312,6 @@ static int qmt_quotactl(const struct lu_env *env, struct lu_device *ld,
                                     dqb->dqb_valid & QIF_BFLAGS);
                break;
 
-       case Q_QUOTAON:
-       case Q_QUOTAOFF:   /* quota is always turned on on the master */
-               RETURN(0);
-
-       case LUSTRE_Q_INVALIDATE: /* not supported any more */
-               RETURN(-ENOTSUPP);
-
        default:
                CERROR("%s: unsupported quotactl command: %d\n",
                       qmt->qmt_svname, oqctl->qc_cmd);
@@ -647,13 +636,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);