[PATCH v2 -next 01/18] fs: pass struct path to notify_change()

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Oct 15 12:31:37 UTC 2026


> notify_change() takes a struct mnt_idmap and a struct dentry even
> though all of its callers either already hold a struct path (or a
> struct file) or have to pass &nop_mnt_idmap because no idmapped
> mount is involved.  Switch the helper and its declaration to take a
> struct path instead and derive the idmap and dentry from it.
> 
> The ntfs named stream support applies metadata changes shared with a
> stream to the base inode's anonymous dentry, for which no struct path
> exists.  Add a __notify_change() variant without the LSM hook call,
> following the __vfs_setxattr_noperm() and __vfs_fileattr_set()
> precedents, and use it for that internal forward: the user-facing
> operation on the stream was already checked by the surrounding
> notify_change() call, so the base inode does not need a second
> security_inode_setattr() check.
> 
> The security_inode_setattr() call within notify_change() keeps taking
> the idmap and dentry for now; it will be converted together with
> the LSM hook itself in a separate patch.
> 
> Assisted-by: opencode: glm-5.3
> Signed-off-by: Cai Xinchen <caixinchen1 at huawei.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261015125425.3246251-1-caixinchen1@huawei.com?part=1




More information about the Linux-security-module-archive mailing list