Skip to content

Commit 0c441da

Browse files
committed
Merge tag 'v6.12.15' into 6.12-main
This is the 6.12.15 stable release # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAme0RigACgkQONu9yGCS # aT41xw/9HNCop88ul5cGTypEznQnPMtQUW4uJapfpaTcP5pq8e2OyhPQQ8V1Qgqk # WNC14stSyoAoC11i9GCI8Gnr7wN/aamav4v9YqMpRH9dvRt+V/KlGqEGNSF+jQWi # 24GrNclVJPv8bseBpdYZQNYd2OEc6xTGqizXWeoJusblqak9v1g80k2f8KerWaPC # vB1/PhGuRYZZ21rMHzyEdQPcg96hMY7EWctRUyMTW9F0MKlqiL+onWgJ/N23pcDs # E51j4yQLcWzgVTZpe9IxlOu9ZmA7Q8/wF15b3zeAvesYcLbZgWg1CLN144ciz3Bx # d/wKxo+H7/ZRLRkABsbEoritgkFME0Nh4hIwQfssO0n830LsKKjxVzumI8UW4Lzp # syq7KM3+OxenssCx1J2DqOdHFTqjpOKexoFjAYkczWmuuNAfQC336XHXvMz5ITfT # zf1XsKjHO7dME/mb5zd1DOBIL38y8QCFtOWP6bMSvpopUOm2P944m01xUzbyGRoO # g/N6RG3Iig86cLPHJCpG5rrFxealg9CPFTW1QV5nC01HpkeAYMIG6HdvHWbiRZvM # XtHF3hpfiuZ+oS41MWH3+dB9mp1C3z7WyzR1Ss7Ohw1IXw1ZPPuRiMbmaOdEAGsa # hRDdW+HKAtfKpauL0k1LFs8riYqn4M+/FlBcw6sOMAcLqIwzz4o= # =8q/m # -----END PGP SIGNATURE----- # gpg: Signature made Tue Feb 18 09:34:48 2025 CET # gpg: using RSA key 647F28654894E3BD457199BE38DBBDC86092693E # gpg: Can't check signature: No public key
2 parents 453083b + 984391d commit 0c441da

4 files changed

Lines changed: 33 additions & 15 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22
VERSION = 6
33
PATCHLEVEL = 12
4-
SUBLEVEL = 14
4+
SUBLEVEL = 15
55
EXTRAVERSION =
66
NAME = Baby Opossum Posse
77

fs/xfs/xfs_quota.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ extern void xfs_trans_free_dqinfo(struct xfs_trans *);
9696
extern void xfs_trans_mod_dquot_byino(struct xfs_trans *, struct xfs_inode *,
9797
uint, int64_t);
9898
extern void xfs_trans_apply_dquot_deltas(struct xfs_trans *);
99-
extern void xfs_trans_unreserve_and_mod_dquots(struct xfs_trans *);
99+
void xfs_trans_unreserve_and_mod_dquots(struct xfs_trans *tp,
100+
bool already_locked);
100101
int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp, struct xfs_inode *ip,
101102
int64_t dblocks, int64_t rblocks, bool force);
102103
extern int xfs_trans_reserve_quota_bydquots(struct xfs_trans *,
@@ -166,7 +167,7 @@ static inline void xfs_trans_mod_dquot_byino(struct xfs_trans *tp,
166167
{
167168
}
168169
#define xfs_trans_apply_dquot_deltas(tp)
169-
#define xfs_trans_unreserve_and_mod_dquots(tp)
170+
#define xfs_trans_unreserve_and_mod_dquots(tp, a)
170171
static inline int xfs_trans_reserve_quota_nblks(struct xfs_trans *tp,
171172
struct xfs_inode *ip, int64_t dblocks, int64_t rblocks,
172173
bool force)

fs/xfs/xfs_trans.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -840,6 +840,7 @@ __xfs_trans_commit(
840840
*/
841841
if (tp->t_flags & XFS_TRANS_SB_DIRTY)
842842
xfs_trans_apply_sb_deltas(tp);
843+
xfs_trans_apply_dquot_deltas(tp);
843844

844845
error = xfs_trans_run_precommits(tp);
845846
if (error)
@@ -868,11 +869,6 @@ __xfs_trans_commit(
868869

869870
ASSERT(tp->t_ticket != NULL);
870871

871-
/*
872-
* If we need to update the superblock, then do it now.
873-
*/
874-
xfs_trans_apply_dquot_deltas(tp);
875-
876872
xlog_cil_commit(log, tp, &commit_seq, regrant);
877873

878874
xfs_trans_free(tp);
@@ -898,7 +894,7 @@ __xfs_trans_commit(
898894
* the dqinfo portion to be. All that means is that we have some
899895
* (non-persistent) quota reservations that need to be unreserved.
900896
*/
901-
xfs_trans_unreserve_and_mod_dquots(tp);
897+
xfs_trans_unreserve_and_mod_dquots(tp, true);
902898
if (tp->t_ticket) {
903899
if (regrant && !xlog_is_shutdown(log))
904900
xfs_log_ticket_regrant(log, tp->t_ticket);
@@ -992,7 +988,7 @@ xfs_trans_cancel(
992988
}
993989
#endif
994990
xfs_trans_unreserve_and_mod_sb(tp);
995-
xfs_trans_unreserve_and_mod_dquots(tp);
991+
xfs_trans_unreserve_and_mod_dquots(tp, false);
996992

997993
if (tp->t_ticket) {
998994
xfs_log_ticket_ungrant(log, tp->t_ticket);

fs/xfs/xfs_trans_dquot.c

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,24 @@ xfs_trans_apply_dquot_deltas(
602602
ASSERT(dqp->q_blk.reserved >= dqp->q_blk.count);
603603
ASSERT(dqp->q_ino.reserved >= dqp->q_ino.count);
604604
ASSERT(dqp->q_rtb.reserved >= dqp->q_rtb.count);
605+
606+
/*
607+
* We've applied the count changes and given back
608+
* whatever reservation we didn't use. Zero out the
609+
* dqtrx fields.
610+
*/
611+
qtrx->qt_blk_res = 0;
612+
qtrx->qt_bcount_delta = 0;
613+
qtrx->qt_delbcnt_delta = 0;
614+
615+
qtrx->qt_rtblk_res = 0;
616+
qtrx->qt_rtblk_res_used = 0;
617+
qtrx->qt_rtbcount_delta = 0;
618+
qtrx->qt_delrtb_delta = 0;
619+
620+
qtrx->qt_ino_res = 0;
621+
qtrx->qt_ino_res_used = 0;
622+
qtrx->qt_icount_delta = 0;
605623
}
606624
}
607625
}
@@ -638,7 +656,8 @@ xfs_trans_unreserve_and_mod_dquots_hook(
638656
*/
639657
void
640658
xfs_trans_unreserve_and_mod_dquots(
641-
struct xfs_trans *tp)
659+
struct xfs_trans *tp,
660+
bool already_locked)
642661
{
643662
int i, j;
644663
struct xfs_dquot *dqp;
@@ -667,10 +686,12 @@ xfs_trans_unreserve_and_mod_dquots(
667686
* about the number of blocks used field, or deltas.
668687
* Also we don't bother to zero the fields.
669688
*/
670-
locked = false;
689+
locked = already_locked;
671690
if (qtrx->qt_blk_res) {
672-
xfs_dqlock(dqp);
673-
locked = true;
691+
if (!locked) {
692+
xfs_dqlock(dqp);
693+
locked = true;
694+
}
674695
dqp->q_blk.reserved -=
675696
(xfs_qcnt_t)qtrx->qt_blk_res;
676697
}
@@ -691,7 +712,7 @@ xfs_trans_unreserve_and_mod_dquots(
691712
dqp->q_rtb.reserved -=
692713
(xfs_qcnt_t)qtrx->qt_rtblk_res;
693714
}
694-
if (locked)
715+
if (locked && !already_locked)
695716
xfs_dqunlock(dqp);
696717

697718
}

0 commit comments

Comments
 (0)