Re: [PATCH -next -v4 01/17] fs: pass struct path to notify_change()

From: Cai Xinchen

Date: Wed Nov 18 2026 - 04:17:30 EST


Yes.  ovl_do_notify_change() passes
ovl_upper_mnt(ofs) together with the real upperdentry, so the sb matches,
and the idmap handed down is ovl_upper_mnt_idmap(ofs), i.e. taken from
that very mount.  It runs under with_ovl_creds(), like the other ovl_do_*
forwards, so an LSM sees a genuine upper-layer path instead of a merged
dentry whose mount we cannot name - which is the point of converting the
metadata helpers.

On 11/18/2026 2:34 AM, Al Viro wrote:
Incidentally, will the mount reference you are supplying in case of overlayfs
upper layer be any good for LSM users?