]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fs: add S_ANON_INODE
authorChristian Brauner <brauner@kernel.org>
Mon, 21 Apr 2025 08:27:40 +0000 (10:27 +0200)
committerChristian Brauner <brauner@kernel.org>
Mon, 21 Apr 2025 11:20:14 +0000 (13:20 +0200)
commit19bbfe7b5fcc04d8711e8e1352acc77c1a5c3955
tree820643f983b700b25e8bde4804e5261080936b39
parentc4044870ae2cb28d11ea771db165edb9e1a60702
fs: add S_ANON_INODE

This makes it easy to detect proper anonymous inodes and to ensure that
we can detect them in codepaths such as readahead().

Readahead on anonymous inodes didn't work because they didn't have a
proper mode. Now that they have we need to retain EINVAL being returned
otherwise LTP will fail.

We also need to ensure that ioctls aren't simply fired like they are for
regular files so things like inotify inodes continue to correctly call
their own ioctl handlers as in [1].

Reported-by: Xilin Wu <sophon@radxa.com>
Link: https://lore.kernel.org/3A9139D5CD543962+89831381-31b9-4392-87ec-a84a5b3507d8@radxa.com
Link: https://lore.kernel.org/7a1a7076-ff6b-4cb0-94e7-7218a0a44028@sirena.org.uk
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/ioctl.c
fs/libfs.c
fs/pidfs.c
include/linux/fs.h
mm/readahead.c