From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-xfs@vger.kernel.org, hch@lst.de
Subject: Re: [PATCH 4/4] xfs: ask the dentry cache if it knows the parent of a directory
Date: Wed, 28 Feb 2024 10:24:48 -0800 [thread overview]
Message-ID: <20240228182448.GN1927156@frogsfrogsfrogs> (raw)
In-Reply-To: <Zd9reRana7Fue2pN@infradead.org>
On Wed, Feb 28, 2024 at 09:20:57AM -0800, Christoph Hellwig wrote:
> > + parent = dget_parent(dentry);
> > + if (!parent)
> > + goto out_dput;
> > +
> > + if (parent->d_sb != sc->ip->i_mount->m_super) {
> > + dput(parent);
> > + goto out_dput;
> > + }
>
> ->d_parent can't point to outside the current sb.
I know, I was being paranoid. Granted if the dcache is broken then
there are probably bigger issues going on. :)
I'll change it to an ASSERT.
--D
next prev parent reply other threads:[~2024-02-28 18:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-27 2:18 [PATCHSET v29.4 09/13] xfs: online repair of directories Darrick J. Wong
2024-02-27 2:31 ` [PATCH 1/4] " Darrick J. Wong
2024-02-28 17:16 ` Christoph Hellwig
2024-02-28 18:22 ` Darrick J. Wong
2024-02-27 2:31 ` [PATCH 2/4] xfs: scan the filesystem to repair a directory dotdot entry Darrick J. Wong
2024-02-28 17:17 ` Christoph Hellwig
2024-02-27 2:31 ` [PATCH 3/4] xfs: online repair of parent pointers Darrick J. Wong
2024-02-28 17:17 ` Christoph Hellwig
2024-02-27 2:31 ` [PATCH 4/4] xfs: ask the dentry cache if it knows the parent of a directory Darrick J. Wong
2024-02-28 17:20 ` Christoph Hellwig
2024-02-28 18:24 ` Darrick J. Wong [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-31 19:31 [PATCHSET v29.0 22/28] xfs: online repair of directories Darrick J. Wong
2023-12-31 20:38 ` [PATCH 4/4] xfs: ask the dentry cache if it knows the parent of a directory Darrick J. Wong
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=20240228182448.GN1927156@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=linux-xfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox