From: Ahelenia Ziemiańska Date: Mon, 8 Dec 2025 22:20:24 +0000 (+0100) Subject: fs: send fsnotify_xattr()/IN_ATTRIB from vfs_fileattr_set()/chattr(1) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f7c877cc397ba3c6d8ba44d4a604df3d4182eec;p=thirdparty%2Flinux.git fs: send fsnotify_xattr()/IN_ATTRIB from vfs_fileattr_set()/chattr(1) Currently it seems impossible to observe these changes to the file's attributes. It's useful to be able to do this to see when the file becomes immutable, for example, so emit IN_ATTRIB via fsnotify_xattr(), like when changing other inode attributes. Signed-off-by: Ahelenia Ziemiańska Link: https://patch.msgid.link/iyvn6qjotpu6cei5jdtsoibfcp6l6rgvn47cwgaucgtucpfy2s@tarta.nabijaczleweli.xyz Signed-off-by: Jan Kara --- diff --git a/fs/file_attr.c b/fs/file_attr.c index 1dcec88c0680..fac41048f7bc 100644 --- a/fs/file_attr.c +++ b/fs/file_attr.c @@ -2,6 +2,7 @@ #include #include #include +#include #include #include #include @@ -298,6 +299,7 @@ int vfs_fileattr_set(struct mnt_idmap *idmap, struct dentry *dentry, err = inode->i_op->fileattr_set(idmap, dentry, fa); if (err) goto out; + fsnotify_xattr(dentry); } out: