Whamcloud - gitweb
LU-13677 quota: qunit sorting doesn't work
[fs/lustre-release.git] / lustre / quota / qmt_pool.c
index 1a4ff12..9f7563c 100644 (file)
@@ -845,9 +845,9 @@ out:
 static int lqes_cmp(const void *arg1, const void *arg2)
 {
        const struct lquota_entry *lqe1, *lqe2;
-       lqe1 = arg1;
-       lqe2 = arg2;
-       return lqe1->lqe_qunit > lqe2->lqe_qunit;
+       lqe1 = *(const struct lquota_entry **)arg1;
+       lqe2 = *(const struct lquota_entry **)arg2;
+       return lqe1->lqe_qunit - lqe2->lqe_qunit;
 }
 
 void qmt_lqes_sort(const struct lu_env *env)