Re: [PATCH v3] fs: let backing files inherit FMODE_NONOTIFY from the user file
From: Christian Brauner
Date: Fri Oct 30 2026 - 11:00:52 EST
On Thu, Oct 29, 2026 at 10:18:40PM +0100, Edvard Conrad wrote:
> Make a backing file inherit FMODE_NONOTIFY when the user file it is
> opened for must not generate events. This restores the pre-6.14
> behaviour for the fds that fanotify creates (and for any other
> FMODE_NONOTIFY file), while ordinary opens through a stacked filesystem
> keep generating events on the real path, as intended by bc2473c90fca.
Looks good to me. I'll take this via vfs.fixes and fix up the subject to
use the "backing-file:" prefix while applying.
Amir, note that the same deadlock is still there for directories.
ovl_dir_open_realfile() goes through ovl_path_open() -> dentry_open()
and not through backing_file_open(). So a FAN_OPEN_PERM|FAN_ONDIR
listener that opens an overlay directory through the fd fanotify handed
it wedges the same way. That needs to be fixed on the overlayfs side.