diff options
| author | Andrey Albershteyn <aalbersh@redhat.com> | 2025-06-30 18:20:14 +0200 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2025-07-02 14:29:10 +0200 |
| commit | 474b155adf3927d2c944423045757b54aa1ca4de (patch) | |
| tree | 0ac9f555a4a34a36d2ee556b3f1514f0cf91052d /fs/fuse | |
| parent | selinux: implement inode_file_[g|s]etattr hooks (diff) | |
| download | linux-474b155adf3927d2c944423045757b54aa1ca4de.tar.gz linux-474b155adf3927d2c944423045757b54aa1ca4de.zip | |
fs: make vfs_fileattr_[get|set] return -EOPNOTSUPP
Future patches will add new syscalls which use these functions. As
this interface won't be used for ioctls only, the EOPNOSUPP is more
appropriate return code.
This patch converts return code from ENOIOCTLCMD to EOPNOSUPP for
vfs_fileattr_get and vfs_fileattr_set. To save old behavior translate
EOPNOSUPP back for current users - overlayfs, encryptfs and fs/ioctl.c.
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
Link: https://lore.kernel.org/20250630-xattrat-syscall-v6-4-c4e3bc35227b@kernel.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/fuse')
| -rw-r--r-- | fs/fuse/ioctl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/fuse/ioctl.c b/fs/fuse/ioctl.c index 2d9abf48828f..f2692f7d5932 100644 --- a/fs/fuse/ioctl.c +++ b/fs/fuse/ioctl.c @@ -536,6 +536,8 @@ int fuse_fileattr_get(struct dentry *dentry, struct fileattr *fa) cleanup: fuse_priv_ioctl_cleanup(inode, ff); + if (err == -ENOTTY) + err = -EOPNOTSUPP; return err; } @@ -572,5 +574,7 @@ int fuse_fileattr_set(struct mnt_idmap *idmap, cleanup: fuse_priv_ioctl_cleanup(inode, ff); + if (err == -ENOTTY) + err = -EOPNOTSUPP; return err; } |
