]> git.ipfire.org Git - thirdparty/linux.git/commit
fsnotify: use accessor to set FMODE_NONOTIFY_*
authorAmir Goldstein <amir73il@gmail.com>
Mon, 3 Feb 2025 22:32:03 +0000 (23:32 +0100)
committerChristian Brauner <brauner@kernel.org>
Fri, 7 Feb 2025 09:27:26 +0000 (10:27 +0100)
commit95101401bb50ae2cf9deee1bbf4d2b28d0dfdc26
treef242d1415175b06d3fe34dc82f111e591dab7298
parent2cc02059fbc79306b53a44b1f1a4444aa3c76598
fsnotify: use accessor to set FMODE_NONOTIFY_*

The FMODE_NONOTIFY_* bits are a 2-bits mode.  Open coding manipulation
of those bits is risky.  Use an accessor file_set_fsnotify_mode() to
set the mode.

Rename file_set_fsnotify_mode() => file_set_fsnotify_mode_from_watchers()
to make way for the simple accessor name.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Link: https://lore.kernel.org/r/20250203223205.861346-2-amir73il@gmail.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
drivers/tty/pty.c
fs/notify/fsnotify.c
fs/open.c
include/linux/fs.h
include/linux/fsnotify.h