fs: move FMODE_NONOTIFY back to bit 26
Subsystems (3)
Sasha Levin
maintainerPATCH 1/1 fs: move FMODE_NONOTIFY back to bit 26
The backport of commit a94204f4d48e ("fsnotify: opt-in for permission events at file open time") moved FMODE_NONOTIFY to bit 25, which is __O_TMPFILE on sparc. 6.12.y still passes FMODE_NONOTIFY in open flags, so the BUILD_BUG_ON() in fcntl_init() has broken sparc builds since v6.12.105.
Swap it with FMODE_NONOTIFY_PERM, which never ends up in open flags.
Upstream avoided this with commit ebe559609d78 ("fs: get rid of __FMODE_NONOTIFY kludge"), but overlayfs in 6.12.y still uses __FMODE_NONOTIFY.
Fixes 07ee6057f92a ("fsnotify: opt-in for permission events at file open time")
Reported-by Guenter Roeck <[email protected]>
Reported-by Iulian Vaideanu <[email protected]>
Closes https://lore.kernel.org/all/CAPK=yVMe1Ro=aw_daLCOM9cBATsp6crdgB4wd0ty4vrnxtVKkQ@mail.gmail.com/ open here
Signed-off-by Sasha Levin <[email protected]>
---
include/linux/fs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/fs.h +2 -2
@@ -178,13 +178,13 @@ typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset,* Together with FMODE_NONOTIFY_PERM defines which fsnotify events shouldn't be * generated (see below) */ -#define FMODE_NONOTIFY ((__force fmode_t)(1 << 25)) +#define FMODE_NONOTIFY ((__force fmode_t)(1 << 26))/* * Together with FMODE_NONOTIFY defines which fsnotify events shouldn't be * generated (see below) */ -#define FMODE_NONOTIFY_PERM ((__force fmode_t)(1 << 26)) +#define FMODE_NONOTIFY_PERM ((__force fmode_t)(1 << 25))/* File is capable of returning -EAGAIN if I/O will block */ #define FMODE_NOWAIT ((__force fmode_t)(1 << 27))
base-commit: e2e4b92c2b2a3ae78423cb343951cb5d2241b405
Signature · 1 line
2.53.0