Re: [PATCH v2 -next 01/18] fs: pass struct path to notify_change()
From: Cai Xinchen
Date: Fri Oct 23 2026 - 02:32:28 EST
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 evenNo, the idmap needs to be passed separately. The whole point is that
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.
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.