# include <linux/fs.h>
# include <linux/jbd.h>
# include <linux/quota.h>
-# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-# include <linux/smp_lock.h>
-# include <linux/buffer_head.h>
-# include <linux/workqueue.h>
-# include <linux/mount.h>
-# else
-# include <linux/locks.h>
-# endif
+# include <linux/smp_lock.h>
+# include <linux/buffer_head.h>
+# include <linux/workqueue.h>
+# include <linux/mount.h>
#else /* __KERNEL__ */
# include <liblustre.h>
#endif
struct lustre_quota_ctxt *qctxt)
{
struct obd_device *obd = exp->exp_obd;
- unsigned int uid = 0, gid = 0;
+ unsigned int id[MAXQUOTAS] = { 0, 0 };
int rc = 0;
ENTRY;
RETURN(rc);
}
if (QAQ_IS_GRP(oqaq))
- gid = oqaq->qaq_id;
+ id[GRPQUOTA] = oqaq->qaq_id;
else
- uid = oqaq->qaq_id;
+ id[USRQUOTA] = oqaq->qaq_id;
if (rc > 0) {
- rc = qctxt_adjust_qunit(obd, qctxt, uid, gid, 1, 0, NULL);
- if (rc == -EDQUOT || rc == -EBUSY || rc == -EAGAIN) {
+ rc = qctxt_adjust_qunit(obd, qctxt, id, 1, 0, NULL);
+ if (rc == -EDQUOT || rc == -EBUSY ||
+ rc == QUOTA_REQ_RETURNED || rc == -EAGAIN) {
CDEBUG(D_QUOTA, "rc: %d.\n", rc);
rc = 0;
}