Re: [PATCH 25/31] xfs: actually check the fsid of a handle

Darrick J. Wong
2024-04-16T17:44:29Z

On Mon, Apr 15, 2024 at 10:19:36PM -0700, Christoph Hellwig wrote:
> On Mon, Apr 15, 2024 at 06:32:33PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > Compare the fsid of a handle to m_fixedfsid so that we don't try to open
> > a handle from the wrong fs and get lucky if the ino/gen happen to match.
>
> I don't think this is a good idea. It'll break so far perfectly valid uses
> of the handle API when userspace hancrafted the handles or stored them
> in a more compact format.

Ah, ok. It'll break userspace, and for the bad-fsid case you'll
probably get an error code unless you get lucky and guess the generation
correctly. Will drop this patch.

--D