linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Albershteyn <aalbersh@redhat.com>
To: cem@kernel.org, djwong@kernel.org, linux-xfs@vger.kernel.org
Cc: Andrey Albershteyn <aalbersh@redhat.com>
Subject: [PATCH 3/3] xfs: add .fileattr_set and fileattr_get callbacks for symlinks
Date: Tue, 29 Jul 2025 13:00:37 +0200	[thread overview]
Message-ID: <20250729-xfs-xattrat-v1-3-7b392eee3587@kernel.org> (raw)
In-Reply-To: <20250729-xfs-xattrat-v1-0-7b392eee3587@kernel.org>

From: Andrey Albershteyn <aalbersh@redhat.com>

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 extended attributes. This
patch adds them. The attribute value combinations are checked in
fileattr_set_prepare().

Signed-off-by: Andrey Albershteyn <aalbersh@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
---
 fs/xfs/xfs_iops.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index 149b5460fbfd..c1234aad11e9 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -1334,6 +1334,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. */

-- 
2.49.0


  parent reply	other threads:[~2025-07-29 11:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29 11:00 [PATCH 0/3] Use new syscalls to set filesystem inode attributes on any inode Andrey Albershteyn
2025-07-29 11:00 ` [PATCH 1/3] xfs: allow renames of project-less inodes Andrey Albershteyn
2025-07-29 11:00 ` [PATCH 2/3] xfs: allow setting xattrs on special files Andrey Albershteyn
2025-07-29 14:32   ` Darrick J. Wong
2025-07-29 14:55     ` Andrey Albershteyn
2025-07-29 11:00 ` Andrey Albershteyn [this message]
2025-07-29 14:34 ` [PATCH 0/3] Use new syscalls to set filesystem inode attributes on any inode Darrick J. Wong
2025-07-29 15:50   ` Andrey Albershteyn
2025-07-29 15:52     ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250729-xfs-xattrat-v1-3-7b392eee3587@kernel.org \
    --to=aalbersh@redhat.com \
    --cc=cem@kernel.org \
    --cc=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).