]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xfs: add .fileattr_set and fileattr_get callbacks for symlinks
authorAndrey Albershteyn <aalbersh@redhat.com>
Mon, 4 Aug 2025 12:08:15 +0000 (14:08 +0200)
committerCarlos Maiolino <cem@kernel.org>
Thu, 28 Aug 2025 12:19:52 +0000 (14:19 +0200)
As there are now file_getattr() and file_setattr(), xfs_quota will
call them on special files. These new syscalls call ->fileattr_get/set.

Symlink inodes don't have callbacks to set file attributes. This
patch adds them. The attribute values combinations are checked in
fileattr_set_prepare().

Signed-off-by: Andrey Albershteyn <aalbersh@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_iops.c

index 603effabe1ee12d6414fa132f7fcbf79bbbcaf99..c0f49bfbed682482ee152ba549988f95cd15e809 100644 (file)
@@ -1335,6 +1335,8 @@ static const struct inode_operations xfs_symlink_inode_operations = {
        .setattr                = xfs_vn_setattr,
        .listxattr              = xfs_vn_listxattr,
        .update_time            = xfs_vn_update_time,
+       .fileattr_get           = xfs_fileattr_get,
+       .fileattr_set           = xfs_fileattr_set,
 };
 
 /* Figure out if this file actually supports DAX. */