Whamcloud - gitweb
LU-3939 tests: sanity-hsm/test_40 needs a local HSM_ARCHIVE
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_quota.c
index f85bef7..d0c0fa2 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
  * Use is subject to license terms.
  *
  * Author: Johann Lombardi <johann@whamcloud.com>
@@ -113,11 +113,19 @@ static int osd_acct_index_lookup(const struct lu_env *env,
        struct lquota_acct_rec  *rec = (struct lquota_acct_rec *)dtrec;
        __u64                    id = *((__u64 *)dtkey);
        int                      rc;
+#ifdef HAVE_DQUOT_KQID
+       struct kqid             qid;
+#endif
 
        ENTRY;
 
        memset((void *)dqblk, 0, sizeof(struct obd_dqblk));
+#ifdef HAVE_DQUOT_KQID
+       qid = make_kqid(&init_user_ns, obj2type(dtobj), id);
+       rc = sb->s_qcop->get_dqblk(sb, qid, dqblk);
+#else
        rc = sb->s_qcop->get_dqblk(sb, obj2type(dtobj), (qid_t) id, dqblk);
+#endif
        if (rc)
                RETURN(rc);
 #ifdef HAVE_DQUOT_FS_DISK_QUOTA