Whamcloud - gitweb
LU-2694 test: fix is_empty_fs in t-f
[fs/lustre-release.git] / lustre / quota / qmt_entry.c
index fa47f52..6fe3c92 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012 Intel, Inc.
+ * Copyright (c) 2012, Intel Corporation.
  * Use is subject to license terms.
  *
  * Author: Johann Lombardi <johann.lombardi@intel.com>
@@ -47,7 +47,7 @@ static void qmt_lqe_init(struct lquota_entry *lqe, void *arg)
        LASSERT(lqe_is_master(lqe));
 
        lqe->lqe_revoke_time = 0;
-       cfs_init_rwsem(&lqe->lqe_sem);
+       init_rwsem(&lqe->lqe_sem);
 }
 
 /*
@@ -416,7 +416,7 @@ void qmt_adjust_edquot(struct lquota_entry *lqe, __u64 now)
        struct qmt_pool_info    *pool = lqe2qpi(lqe);
        ENTRY;
 
-       if (!lqe->lqe_enforced)
+       if (!lqe->lqe_enforced || lqe->lqe_id.qid_uid == 0)
                RETURN_EXIT;
 
        if (!lqe->lqe_edquot) {
@@ -545,7 +545,7 @@ void qmt_adjust_qunit(const struct lu_env *env, struct lquota_entry *lqe)
 
        LASSERT(lqe_is_locked(lqe));
 
-       if (!lqe->lqe_enforced)
+       if (!lqe->lqe_enforced || lqe->lqe_id.qid_uid == 0)
                /* no quota limits */
                RETURN_EXIT;