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

Cai Xinchen caixinchen1 at huawei.com
Fri Oct 23 06:31:28 UTC 2026


Thanks for the explanation, you are right.  I will restore the idmap as 
a separate argument

On 10/21/2026 6:21 PM, Christian Brauner wrote:
> On Thu, Oct 15, 2026 at 08:54:07PM +0800, Cai Xinchen wrote:
>> 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.
> No, the idmap needs to be passed separately. The whole point is that
> during path lookup mnt->mnt_idmap can change. So mnt->mnt_idmap is taken
> of the mount at the time it was checked and passed down to the
> filesystem so that the VFS and the filesystem are guaranteed to see the
> same idmap.



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