diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-07-14 11:06:51 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-10-14 14:16:52 -0700 |
commit | 5bd194f351782bbed2f275800d82232852ce8f1c (patch) | |
tree | e2ef4fd961e7a8f2afbb0cd1978486d63b626aad /fs/xfs/xfs_export.c | |
parent | 1b26cab774b359fb82a23e166e251ce6f4afe158 (diff) |
xfs: hide private inodes from bulkstat and handle functions
We're about to start adding functionality that uses internal inodes that
are private to XFS. What this means is that userspace should never be
able to access any information about these files, and should not be able
to open these files by handle. Callers are not allowed to link these
files into the directory tree, which should suffice to make these
private inodes actually private.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_export.c')
-rw-r--r-- | fs/xfs/xfs_export.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_export.c b/fs/xfs/xfs_export.c index 1064c2342876..b6ba96e0dd75 100644 --- a/fs/xfs/xfs_export.c +++ b/fs/xfs/xfs_export.c @@ -146,7 +146,7 @@ xfs_nfs_get_inode( return ERR_PTR(error); } - if (VFS_I(ip)->i_generation != generation) { + if (VFS_I(ip)->i_generation != generation || IS_PRIVATE(VFS_I(ip))) { xfs_irele(ip); return ERR_PTR(-ESTALE); } |