1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2002 Silicon Graphics, Inc.
8 #include "xfs_shared.h"
9 #include "xfs_format.h"
10 #include "xfs_log_format.h"
11 #include "xfs_trans_resv.h"
12 #include "xfs_mount.h"
13 #include "xfs_inode.h"
14 #include "xfs_trans.h"
15 #include "xfs_trans_priv.h"
16 #include "xfs_quota.h"
18 #include "xfs_trace.h"
19 #include "xfs_error.h"
21 STATIC void xfs_trans_alloc_dqinfo(xfs_trans_t *);
24 * Add the locked dquot to the transaction.
25 * The dquot must be locked, and it cannot be associated with any
31 struct xfs_dquot *dqp)
33 ASSERT(XFS_DQ_IS_LOCKED(dqp));
34 ASSERT(dqp->q_logitem.qli_dquot == dqp);
37 * Get a log_item_desc to point at the new item.
39 xfs_trans_add_item(tp, &dqp->q_logitem.qli_item);
43 * This is called to mark the dquot as needing
44 * to be logged when the transaction is committed. The dquot must
45 * already be associated with the given transaction.
46 * Note that it marks the entire transaction as dirty. In the ordinary
47 * case, this gets called via xfs_trans_commit, after the transaction
48 * is already dirty. However, there's nothing stop this from getting
49 * called directly, as done by xfs_qm_scall_setqlim. Hence, the TRANS_DIRTY
55 struct xfs_dquot *dqp)
57 ASSERT(XFS_DQ_IS_LOCKED(dqp));
59 /* Upgrade the dquot to bigtime format if possible. */
61 xfs_sb_version_hasbigtime(&tp->t_mountp->m_sb) &&
62 !(dqp->q_type & XFS_DQTYPE_BIGTIME))
63 dqp->q_type |= XFS_DQTYPE_BIGTIME;
65 tp->t_flags |= XFS_TRANS_DIRTY;
66 set_bit(XFS_LI_DIRTY, &dqp->q_logitem.qli_item.li_flags);
70 * Carry forward whatever is left of the quota blk reservation to
71 * the spanky new transaction
75 struct xfs_trans *otp,
76 struct xfs_trans *ntp)
78 struct xfs_dqtrx *oq, *nq;
80 struct xfs_dqtrx *oqa, *nqa;
81 uint64_t blk_res_used;
86 xfs_trans_alloc_dqinfo(ntp);
89 * Because the quota blk reservation is carried forward,
90 * it is also necessary to carry forward the DQ_DIRTY flag.
92 if (otp->t_flags & XFS_TRANS_DQ_DIRTY)
93 ntp->t_flags |= XFS_TRANS_DQ_DIRTY;
95 for (j = 0; j < XFS_QM_TRANS_DQTYPES; j++) {
96 oqa = otp->t_dqinfo->dqs[j];
97 nqa = ntp->t_dqinfo->dqs[j];
98 for (i = 0; i < XFS_QM_TRANS_MAXDQS; i++) {
101 if (oqa[i].qt_dquot == NULL)
106 if (oq->qt_blk_res && oq->qt_bcount_delta > 0)
107 blk_res_used = oq->qt_bcount_delta;
109 nq->qt_dquot = oq->qt_dquot;
110 nq->qt_bcount_delta = nq->qt_icount_delta = 0;
111 nq->qt_rtbcount_delta = 0;
114 * Transfer whatever is left of the reservations.
116 nq->qt_blk_res = oq->qt_blk_res - blk_res_used;
117 oq->qt_blk_res = blk_res_used;
119 nq->qt_rtblk_res = oq->qt_rtblk_res -
120 oq->qt_rtblk_res_used;
121 oq->qt_rtblk_res = oq->qt_rtblk_res_used;
123 nq->qt_ino_res = oq->qt_ino_res - oq->qt_ino_res_used;
124 oq->qt_ino_res = oq->qt_ino_res_used;
131 * Wrap around mod_dquot to account for both user and group quotas.
134 xfs_trans_mod_dquot_byino(
140 xfs_mount_t *mp = tp->t_mountp;
142 if (!XFS_IS_QUOTA_RUNNING(mp) ||
143 !XFS_IS_QUOTA_ON(mp) ||
144 xfs_is_quota_inode(&mp->m_sb, ip->i_ino))
147 if (tp->t_dqinfo == NULL)
148 xfs_trans_alloc_dqinfo(tp);
150 if (XFS_IS_UQUOTA_ON(mp) && ip->i_udquot)
151 (void) xfs_trans_mod_dquot(tp, ip->i_udquot, field, delta);
152 if (XFS_IS_GQUOTA_ON(mp) && ip->i_gdquot)
153 (void) xfs_trans_mod_dquot(tp, ip->i_gdquot, field, delta);
154 if (XFS_IS_PQUOTA_ON(mp) && ip->i_pdquot)
155 (void) xfs_trans_mod_dquot(tp, ip->i_pdquot, field, delta);
158 STATIC struct xfs_dqtrx *
160 struct xfs_trans *tp,
161 struct xfs_dquot *dqp)
164 struct xfs_dqtrx *qa;
166 switch (xfs_dquot_type(dqp)) {
167 case XFS_DQTYPE_USER:
168 qa = tp->t_dqinfo->dqs[XFS_QM_TRANS_USR];
170 case XFS_DQTYPE_GROUP:
171 qa = tp->t_dqinfo->dqs[XFS_QM_TRANS_GRP];
173 case XFS_DQTYPE_PROJ:
174 qa = tp->t_dqinfo->dqs[XFS_QM_TRANS_PRJ];
180 for (i = 0; i < XFS_QM_TRANS_MAXDQS; i++) {
181 if (qa[i].qt_dquot == NULL ||
182 qa[i].qt_dquot == dqp)
190 * Make the changes in the transaction structure.
191 * The moral equivalent to xfs_trans_mod_sb().
192 * We don't touch any fields in the dquot, so we don't care
193 * if it's locked or not (most of the time it won't be).
197 struct xfs_trans *tp,
198 struct xfs_dquot *dqp,
202 struct xfs_dqtrx *qtrx;
205 ASSERT(XFS_IS_QUOTA_RUNNING(tp->t_mountp));
208 if (tp->t_dqinfo == NULL)
209 xfs_trans_alloc_dqinfo(tp);
211 * Find either the first free slot or the slot that belongs
214 qtrx = xfs_trans_get_dqtrx(tp, dqp);
216 if (qtrx->qt_dquot == NULL)
217 qtrx->qt_dquot = dqp;
220 trace_xfs_trans_mod_dquot_before(qtrx);
221 trace_xfs_trans_mod_dquot(tp, dqp, field, delta);
225 /* regular disk blk reservation */
226 case XFS_TRANS_DQ_RES_BLKS:
227 qtrx->qt_blk_res += delta;
230 /* inode reservation */
231 case XFS_TRANS_DQ_RES_INOS:
232 qtrx->qt_ino_res += delta;
235 /* disk blocks used. */
236 case XFS_TRANS_DQ_BCOUNT:
237 qtrx->qt_bcount_delta += delta;
240 case XFS_TRANS_DQ_DELBCOUNT:
241 qtrx->qt_delbcnt_delta += delta;
245 case XFS_TRANS_DQ_ICOUNT:
246 if (qtrx->qt_ino_res && delta > 0) {
247 qtrx->qt_ino_res_used += delta;
248 ASSERT(qtrx->qt_ino_res >= qtrx->qt_ino_res_used);
250 qtrx->qt_icount_delta += delta;
253 /* rtblk reservation */
254 case XFS_TRANS_DQ_RES_RTBLKS:
255 qtrx->qt_rtblk_res += delta;
259 case XFS_TRANS_DQ_RTBCOUNT:
260 if (qtrx->qt_rtblk_res && delta > 0) {
261 qtrx->qt_rtblk_res_used += delta;
262 ASSERT(qtrx->qt_rtblk_res >= qtrx->qt_rtblk_res_used);
264 qtrx->qt_rtbcount_delta += delta;
267 case XFS_TRANS_DQ_DELRTBCOUNT:
268 qtrx->qt_delrtb_delta += delta;
276 trace_xfs_trans_mod_dquot_after(qtrx);
278 tp->t_flags |= XFS_TRANS_DQ_DIRTY;
283 * Given an array of dqtrx structures, lock all the dquots associated and join
284 * them to the transaction, provided they have been modified. We know that the
285 * highest number of dquots of one type - usr, grp and prj - involved in a
286 * transaction is 3 so we don't need to make this very generic.
289 xfs_trans_dqlockedjoin(
290 struct xfs_trans *tp,
293 ASSERT(q[0].qt_dquot != NULL);
294 if (q[1].qt_dquot == NULL) {
295 xfs_dqlock(q[0].qt_dquot);
296 xfs_trans_dqjoin(tp, q[0].qt_dquot);
298 ASSERT(XFS_QM_TRANS_MAXDQS == 2);
299 xfs_dqlock2(q[0].qt_dquot, q[1].qt_dquot);
300 xfs_trans_dqjoin(tp, q[0].qt_dquot);
301 xfs_trans_dqjoin(tp, q[1].qt_dquot);
305 /* Apply dqtrx changes to the quota reservation counters. */
307 xfs_apply_quota_reservation_deltas(
308 struct xfs_dquot_res *res,
315 * Subtle math here: If reserved > res_used (the normal case),
316 * we're simply subtracting the unused transaction quota
317 * reservation from the dquot reservation.
319 * If, however, res_used > reserved, then we have allocated
320 * more quota blocks than were reserved for the transaction.
321 * We must add that excess to the dquot reservation since it
322 * tracks (usage + resv) and by definition we didn't reserve
325 res->reserved -= abs(reserved - res_used);
326 } else if (count_delta != 0) {
328 * These blks were never reserved, either inside a transaction
329 * or outside one (in a delayed allocation). Also, this isn't
330 * always a negative number since we sometimes deliberately
331 * skip quota reservations.
333 res->reserved += count_delta;
338 * Called by xfs_trans_commit() and similar in spirit to
339 * xfs_trans_apply_sb_deltas().
340 * Go thru all the dquots belonging to this transaction and modify the
341 * INCORE dquot to reflect the actual usages.
342 * Unreserve just the reservations done by this transaction.
343 * dquot is still left locked at exit.
346 xfs_trans_apply_dquot_deltas(
347 struct xfs_trans *tp)
350 struct xfs_dquot *dqp;
351 struct xfs_dqtrx *qtrx, *qa;
353 int64_t totalrtbdelta;
355 if (!(tp->t_flags & XFS_TRANS_DQ_DIRTY))
358 ASSERT(tp->t_dqinfo);
359 for (j = 0; j < XFS_QM_TRANS_DQTYPES; j++) {
360 qa = tp->t_dqinfo->dqs[j];
361 if (qa[0].qt_dquot == NULL)
365 * Lock all of the dquots and join them to the transaction.
367 xfs_trans_dqlockedjoin(tp, qa);
369 for (i = 0; i < XFS_QM_TRANS_MAXDQS; i++) {
370 uint64_t blk_res_used;
374 * The array of dquots is filled
375 * sequentially, not sparsely.
377 if ((dqp = qtrx->qt_dquot) == NULL)
380 ASSERT(XFS_DQ_IS_LOCKED(dqp));
383 * adjust the actual number of blocks used
387 * The issue here is - sometimes we don't make a blkquota
388 * reservation intentionally to be fair to users
389 * (when the amount is small). On the other hand,
390 * delayed allocs do make reservations, but that's
391 * outside of a transaction, so we have no
392 * idea how much was really reserved.
393 * So, here we've accumulated delayed allocation blks and
394 * non-delay blks. The assumption is that the
395 * delayed ones are always reserved (outside of a
396 * transaction), and the others may or may not have
397 * quota reservations.
399 totalbdelta = qtrx->qt_bcount_delta +
400 qtrx->qt_delbcnt_delta;
401 totalrtbdelta = qtrx->qt_rtbcount_delta +
402 qtrx->qt_delrtb_delta;
404 if (totalbdelta != 0 || totalrtbdelta != 0 ||
405 qtrx->qt_icount_delta != 0) {
406 trace_xfs_trans_apply_dquot_deltas_before(dqp);
407 trace_xfs_trans_apply_dquot_deltas(qtrx);
412 ASSERT(dqp->q_blk.count >= -totalbdelta);
414 if (totalrtbdelta < 0)
415 ASSERT(dqp->q_rtb.count >= -totalrtbdelta);
417 if (qtrx->qt_icount_delta < 0)
418 ASSERT(dqp->q_ino.count >= -qtrx->qt_icount_delta);
421 dqp->q_blk.count += totalbdelta;
423 if (qtrx->qt_icount_delta)
424 dqp->q_ino.count += qtrx->qt_icount_delta;
427 dqp->q_rtb.count += totalrtbdelta;
429 if (totalbdelta != 0 || totalrtbdelta != 0 ||
430 qtrx->qt_icount_delta != 0)
431 trace_xfs_trans_apply_dquot_deltas_after(dqp);
434 * Get any default limits in use.
435 * Start/reset the timer(s) if needed.
438 xfs_qm_adjust_dqlimits(dqp);
439 xfs_qm_adjust_dqtimers(dqp);
442 dqp->q_flags |= XFS_DQFLAG_DIRTY;
444 * add this to the list of items to get logged
446 xfs_trans_log_dquot(tp, dqp);
448 * Take off what's left of the original reservation.
449 * In case of delayed allocations, there's no
450 * reservation that a transaction structure knows of.
452 blk_res_used = max_t(int64_t, 0, qtrx->qt_bcount_delta);
453 xfs_apply_quota_reservation_deltas(&dqp->q_blk,
454 qtrx->qt_blk_res, blk_res_used,
455 qtrx->qt_bcount_delta);
458 * Adjust the RT reservation.
460 xfs_apply_quota_reservation_deltas(&dqp->q_rtb,
462 qtrx->qt_rtblk_res_used,
463 qtrx->qt_rtbcount_delta);
466 * Adjust the inode reservation.
468 ASSERT(qtrx->qt_ino_res >= qtrx->qt_ino_res_used);
469 xfs_apply_quota_reservation_deltas(&dqp->q_ino,
471 qtrx->qt_ino_res_used,
472 qtrx->qt_icount_delta);
474 ASSERT(dqp->q_blk.reserved >= dqp->q_blk.count);
475 ASSERT(dqp->q_ino.reserved >= dqp->q_ino.count);
476 ASSERT(dqp->q_rtb.reserved >= dqp->q_rtb.count);
482 * Release the reservations, and adjust the dquots accordingly.
483 * This is called only when the transaction is being aborted. If by
484 * any chance we have done dquot modifications incore (ie. deltas) already,
485 * we simply throw those away, since that's the expected behavior
486 * when a transaction is curtailed without a commit.
489 xfs_trans_unreserve_and_mod_dquots(
490 struct xfs_trans *tp)
493 struct xfs_dquot *dqp;
494 struct xfs_dqtrx *qtrx, *qa;
497 if (!tp->t_dqinfo || !(tp->t_flags & XFS_TRANS_DQ_DIRTY))
500 for (j = 0; j < XFS_QM_TRANS_DQTYPES; j++) {
501 qa = tp->t_dqinfo->dqs[j];
503 for (i = 0; i < XFS_QM_TRANS_MAXDQS; i++) {
506 * We assume that the array of dquots is filled
507 * sequentially, not sparsely.
509 if ((dqp = qtrx->qt_dquot) == NULL)
512 * Unreserve the original reservation. We don't care
513 * about the number of blocks used field, or deltas.
514 * Also we don't bother to zero the fields.
517 if (qtrx->qt_blk_res) {
520 dqp->q_blk.reserved -=
521 (xfs_qcnt_t)qtrx->qt_blk_res;
523 if (qtrx->qt_ino_res) {
528 dqp->q_ino.reserved -=
529 (xfs_qcnt_t)qtrx->qt_ino_res;
532 if (qtrx->qt_rtblk_res) {
537 dqp->q_rtb.reserved -=
538 (xfs_qcnt_t)qtrx->qt_rtblk_res;
549 struct xfs_mount *mp,
550 struct xfs_dquot *dqp,
553 enum quota_type qtype;
555 switch (xfs_dquot_type(dqp)) {
556 case XFS_DQTYPE_PROJ:
559 case XFS_DQTYPE_USER:
562 case XFS_DQTYPE_GROUP:
569 quota_send_warning(make_kqid(&init_user_ns, qtype, dqp->q_id),
570 mp->m_super->s_dev, type);
574 * Decide if we can make an additional reservation against a quota resource.
575 * Returns an inode QUOTA_NL_ warning code and whether or not it's fatal.
577 * Note that we assume that the numeric difference between the inode and block
578 * warning codes will always be 3 since it's userspace ABI now, and will never
579 * decrease the quota reservation, so the *BELOW messages are irrelevant.
583 struct xfs_dquot_res *res,
584 struct xfs_quota_limits *qlim,
588 xfs_qcnt_t hardlimit = res->hardlimit;
589 xfs_qcnt_t softlimit = res->softlimit;
590 xfs_qcnt_t total_count = res->reserved + delta;
592 BUILD_BUG_ON(QUOTA_NL_BHARDWARN != QUOTA_NL_IHARDWARN + 3);
593 BUILD_BUG_ON(QUOTA_NL_BSOFTLONGWARN != QUOTA_NL_ISOFTLONGWARN + 3);
594 BUILD_BUG_ON(QUOTA_NL_BSOFTWARN != QUOTA_NL_ISOFTWARN + 3);
598 return QUOTA_NL_NOWARN;
601 hardlimit = qlim->hard;
603 softlimit = qlim->soft;
605 if (hardlimit && total_count > hardlimit) {
607 return QUOTA_NL_IHARDWARN;
610 if (softlimit && total_count > softlimit) {
611 time64_t now = ktime_get_real_seconds();
613 if ((res->timer != 0 && now > res->timer) ||
614 (res->warnings != 0 && res->warnings >= qlim->warn)) {
616 return QUOTA_NL_ISOFTLONGWARN;
619 return QUOTA_NL_ISOFTWARN;
622 return QUOTA_NL_NOWARN;
626 * This reserves disk blocks and inodes against a dquot.
627 * Flags indicate if the dquot is to be locked here and also
628 * if the blk reservation is for RT or regular blocks.
629 * Sending in XFS_QMOPT_FORCE_RES flag skips the quota check.
633 struct xfs_trans *tp,
634 struct xfs_mount *mp,
635 struct xfs_dquot *dqp,
640 struct xfs_quotainfo *q = mp->m_quotainfo;
641 struct xfs_def_quota *defq;
642 struct xfs_dquot_res *blkres;
643 struct xfs_quota_limits *qlim;
647 defq = xfs_get_defquota(q, xfs_dquot_type(dqp));
649 if (flags & XFS_TRANS_DQ_RES_BLKS) {
650 blkres = &dqp->q_blk;
653 blkres = &dqp->q_rtb;
657 if ((flags & XFS_QMOPT_FORCE_RES) == 0 && dqp->q_id &&
658 xfs_dquot_is_enforced(dqp)) {
663 * dquot is locked already. See if we'd go over the hardlimit
664 * or exceed the timelimit if we'd reserve resources.
666 quota_nl = xfs_dqresv_check(blkres, qlim, nblks, &fatal);
667 if (quota_nl != QUOTA_NL_NOWARN) {
669 * Quota block warning codes are 3 more than the inode
670 * codes, which we check above.
672 xfs_quota_warn(mp, dqp, quota_nl + 3);
677 quota_nl = xfs_dqresv_check(&dqp->q_ino, &defq->ino, ninos,
679 if (quota_nl != QUOTA_NL_NOWARN) {
680 xfs_quota_warn(mp, dqp, quota_nl);
687 * Change the reservation, but not the actual usage.
688 * Note that q_blk.reserved = q_blk.count + resv
690 blkres->reserved += (xfs_qcnt_t)nblks;
691 dqp->q_ino.reserved += (xfs_qcnt_t)ninos;
694 * note the reservation amt in the trans struct too,
695 * so that the transaction knows how much was reserved by
696 * it against this particular dquot.
697 * We don't do this when we are reserving for a delayed allocation,
698 * because we don't have the luxury of a transaction envelope then.
701 ASSERT(tp->t_dqinfo);
702 ASSERT(flags & XFS_QMOPT_RESBLK_MASK);
704 xfs_trans_mod_dquot(tp, dqp,
705 flags & XFS_QMOPT_RESBLK_MASK,
708 xfs_trans_mod_dquot(tp, dqp,
709 XFS_TRANS_DQ_RES_INOS,
713 if (XFS_IS_CORRUPT(mp, dqp->q_blk.reserved < dqp->q_blk.count) ||
714 XFS_IS_CORRUPT(mp, dqp->q_rtb.reserved < dqp->q_rtb.count) ||
715 XFS_IS_CORRUPT(mp, dqp->q_ino.reserved < dqp->q_ino.count))
723 if (xfs_dquot_type(dqp) == XFS_DQTYPE_PROJ)
728 xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
729 return -EFSCORRUPTED;
734 * Given dquot(s), make disk block and/or inode reservations against them.
735 * The fact that this does the reservation against user, group and
736 * project quotas is important, because this follows a all-or-nothing
739 * flags = XFS_QMOPT_FORCE_RES evades limit enforcement. Used by chown.
740 * XFS_QMOPT_ENOSPC returns ENOSPC not EDQUOT. Used by pquota.
741 * XFS_TRANS_DQ_RES_BLKS reserves regular disk blocks
742 * XFS_TRANS_DQ_RES_RTBLKS reserves realtime disk blocks
743 * dquots are unlocked on return, if they were not locked by caller.
746 xfs_trans_reserve_quota_bydquots(
747 struct xfs_trans *tp,
748 struct xfs_mount *mp,
749 struct xfs_dquot *udqp,
750 struct xfs_dquot *gdqp,
751 struct xfs_dquot *pdqp,
758 if (!XFS_IS_QUOTA_RUNNING(mp) || !XFS_IS_QUOTA_ON(mp))
761 if (tp && tp->t_dqinfo == NULL)
762 xfs_trans_alloc_dqinfo(tp);
764 ASSERT(flags & XFS_QMOPT_RESBLK_MASK);
767 error = xfs_trans_dqresv(tp, mp, udqp, nblks, ninos, flags);
773 error = xfs_trans_dqresv(tp, mp, gdqp, nblks, ninos, flags);
779 error = xfs_trans_dqresv(tp, mp, pdqp, nblks, ninos, flags);
785 * Didn't change anything critical, so, no need to log
790 flags |= XFS_QMOPT_FORCE_RES;
792 xfs_trans_dqresv(tp, mp, gdqp, -nblks, -ninos, flags);
794 flags |= XFS_QMOPT_FORCE_RES;
796 xfs_trans_dqresv(tp, mp, udqp, -nblks, -ninos, flags);
802 * Lock the dquot and change the reservation if we can.
803 * This doesn't change the actual usage, just the reservation.
804 * The inode sent in is locked.
807 xfs_trans_reserve_quota_nblks(
808 struct xfs_trans *tp,
809 struct xfs_inode *ip,
814 struct xfs_mount *mp = ip->i_mount;
816 if (!XFS_IS_QUOTA_RUNNING(mp) || !XFS_IS_QUOTA_ON(mp))
819 ASSERT(!xfs_is_quota_inode(&mp->m_sb, ip->i_ino));
821 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
822 ASSERT((flags & ~(XFS_QMOPT_FORCE_RES)) == XFS_TRANS_DQ_RES_RTBLKS ||
823 (flags & ~(XFS_QMOPT_FORCE_RES)) == XFS_TRANS_DQ_RES_BLKS);
826 * Reserve nblks against these dquots, with trans as the mediator.
828 return xfs_trans_reserve_quota_bydquots(tp, mp,
829 ip->i_udquot, ip->i_gdquot,
831 nblks, ninos, flags);
835 * This routine is called to allocate a quotaoff log item.
837 struct xfs_qoff_logitem *
838 xfs_trans_get_qoff_item(
839 struct xfs_trans *tp,
840 struct xfs_qoff_logitem *startqoff,
843 struct xfs_qoff_logitem *q;
847 q = xfs_qm_qoff_logitem_init(tp->t_mountp, startqoff, flags);
851 * Get a log_item_desc to point at the new item.
853 xfs_trans_add_item(tp, &q->qql_item);
859 * This is called to mark the quotaoff logitem as needing
860 * to be logged when the transaction is committed. The logitem must
861 * already be associated with the given transaction.
864 xfs_trans_log_quotaoff_item(
865 struct xfs_trans *tp,
866 struct xfs_qoff_logitem *qlp)
868 tp->t_flags |= XFS_TRANS_DIRTY;
869 set_bit(XFS_LI_DIRTY, &qlp->qql_item.li_flags);
873 xfs_trans_alloc_dqinfo(
876 tp->t_dqinfo = kmem_cache_zalloc(xfs_qm_dqtrxzone,
877 GFP_KERNEL | __GFP_NOFAIL);
881 xfs_trans_free_dqinfo(
886 kmem_cache_free(xfs_qm_dqtrxzone, tp->t_dqinfo);