]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: hide metadata inodes from everyone because they are special
authorDarrick J. Wong <djwong@kernel.org>
Wed, 29 May 2024 04:11:00 +0000 (21:11 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:17:13 +0000 (17:17 -0700)
commitd926fa416486abc5a2c3d2d08e595a744b72ff8f
tree41da768ba14dcba0ef993739fd876bb427e9c647
parente559a09dbaddc9c7f2ecf0e85f0bc5c76c1fe4c7
xfs: hide metadata inodes from everyone because they are special

Metadata inodes are private files and therefore cannot be exposed to
userspace.  This means no bulkstat, no open-by-handle, no linking them
into the directory tree, and no feeding them to LSMs.  As such, we mark
them S_PRIVATE, which stops all that.

While we're at it, put them in a separate lockdep class so that it won't
get confused by "recursive" i_rwsem locking such as what happens when we
write to a rt file and need to allocate from the rt bitmap file.  The
static function that we use to do this will be exported in the rtgroups
patchset.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/scrub/tempfile.c
fs/xfs/xfs_iops.c