Skip to contentSkip to conversation

fs: move FMODE_NONOTIFY back to bit 26

PATCH New Sasha Levin 1 participant 1 message Nov 24

Subsystems (3)
lore
Share & tools
lore

Sasha Levin

author maintainer
#0 lore raw

PATCH 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.

---

 include/linux/fs.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/fs.h +2 -2
index 67b57ce46b203..d696a21b69ee2 100644
@@ -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