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

Christoph Hellwig
2024-04-16T05:19:36Z

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.