diff -drupN a/fs/inode.c b/fs/inode.c --- a/fs/inode.c 2018-08-06 17:23:04.000000000 +0300 +++ b/fs/inode.c 2022-06-12 05:28:14.000000000 +0300 @@ -1781,7 +1781,7 @@ int dentry_needs_remove_privs(struct den return mask; } -static int __remove_privs(struct dentry *dentry, int kill) +static int __remove_privs(struct vfsmount *mnt, struct dentry *dentry, int kill) { struct iattr newattrs; @@ -1790,7 +1790,7 @@ static int __remove_privs(struct dentry * Note we call this on write, so notify_change will not * encounter any conflicting delegations: */ - return notify_change(dentry, &newattrs, NULL); + return notify_change2(mnt, dentry, &newattrs, NULL); } /* @@ -1812,7 +1812,7 @@ int file_remove_privs(struct file *file) if (kill < 0) return kill; if (kill) - error = __remove_privs(dentry, kill); + error = __remove_privs(file->f_path.mnt, dentry, kill); if (!error) inode_has_no_xattr(inode);