From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: hch@lst.de, cem@kernel.org, stable@vger.kernel.org,
linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/6] xfs: don't double-lock when deleting a self-referential directory
Date: Fri, 24 Jul 2026 15:23:28 +0200 [thread overview]
Message-ID: <20260724132328.GB28170@lst.de> (raw)
In-Reply-To: <178487405420.3442778.11716685055970529363.stgit@frogsfrogsfrogs>
On Thu, Jul 23, 2026 at 11:21:31PM -0700, Darrick J. Wong wrote:
> - error = xfs_trans_alloc_dir(dp, &M_RES(mp)->tr_remove, sc->ip,
> - &resblks, &sc->tp, &dontcare);
> + if (sc->ip == dp) {
> +again:
> + error = xfs_trans_alloc_inode(dp, &M_RES(mp)->tr_remove,
> + resblks, 0, false, &sc->tp);
> + if ((error == -ENOSPC || error == -EDQUOT) && resblks > 0) {
> + resblks = 0;
> + goto again;
> + }
> + } else {
> + error = xfs_trans_alloc_dir(dp, &M_RES(mp)->tr_remove, sc->ip,
> + &resblks, &sc->tp, &dontcare);
Kinda annoying that the resblks handling is so different between the
two, but we'not going to fix this right now:
Reviewed-by: Christoph Hellwig <hch@lst.de>
next prev parent reply other threads:[~2026-07-24 13:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 6:21 [PATCHSET] xfs: LLM-inspired bug fixes, part 4 Darrick J. Wong
2026-07-24 6:21 ` [PATCH 1/6] xfs: only check mergeability of bnobt records Darrick J. Wong
2026-07-24 13:21 ` Christoph Hellwig
2026-07-24 6:21 ` [PATCH 2/6] xfs: don't double-lock when deleting a self-referential directory Darrick J. Wong
2026-07-24 13:23 ` Christoph Hellwig [this message]
2026-07-24 6:21 ` [PATCH 3/6] xfs: don't return EFSCORRUPTED when scrubbing corrupt parent pointers Darrick J. Wong
2026-07-24 13:23 ` Christoph Hellwig
2026-07-24 6:22 ` [PATCH 4/6] xfs: don't zap the attr fork on repair when there are queued pptr updates Darrick J. Wong
2026-07-24 13:25 ` Christoph Hellwig
2026-07-24 17:05 ` Darrick J. Wong
2026-07-24 6:22 ` [PATCH 5/6] xfs: nlink scrub must take IOLOCK before determining ILOCK state Darrick J. Wong
2026-07-24 13:26 ` Christoph Hellwig
2026-07-24 6:22 ` [PATCH 6/6] xfs: avoid UAF on sc->tempip in xrep_tempfile_create Darrick J. Wong
2026-07-24 13:26 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260724132328.GB28170@lst.de \
--to=hch@lst.de \
--cc=cem@kernel.org \
--cc=djwong@kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.