Thread (52 messages) flat view 52 messages, 8 authors, 2025-10-07

Re: [PATCH v6 4/6] fs: make vfs_fileattr_[get|set] return -EOPNOSUPP

From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2025-10-06 11:44:08
Also in: linux-fsdevel, linux-xfs, lkml, selinux

On Mon, Oct 6, 2025, at 13:09, Jiri Slaby wrote:
On 30. 06. 25, 18:20, Andrey Albershteyn wrote:
quoted
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.
...
dumps in 6.16:
sf: ioctl: Operation not supported

with the above patch:
sf: ioctl: Inappropriate ioctl for device


Is this expected?
This does look like an unintentional bug: As far as I can see, the
-ENOIOCTLCMD was previously used to indicate that a particular filesystem
does not have a fileattr_{get,set} callback at all, while individual
filesystems used EOPNOSUPP to indicate that a particular attribute
flag is unsupported. With the double conversion, both error codes
get turned into a single one.

     Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help