inotify: move control flags from mask to mark flags
[ Upstream commit 38035c04f5865c4ef9597d6beed6a7178f90f64a ] The inotify control flags in the mark mask (e.g. FS_IN_ONE_SHOT) are not relevant to object interest mask, so move them to the mark flags. This frees up some bits in the object interest mask. Link: https://lore.kernel.org/r/20220422120327.3459282-3-amir73il@gmail.com Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
aecfd231bf
commit
1c47d87317
@@ -55,7 +55,6 @@
|
||||
#define FS_ACCESS_PERM 0x00020000 /* access event in a permissions hook */
|
||||
#define FS_OPEN_EXEC_PERM 0x00040000 /* open/exec event in a permission hook */
|
||||
|
||||
#define FS_EXCL_UNLINK 0x04000000 /* do not send events if object is unlinked */
|
||||
/*
|
||||
* Set on inode mark that cares about things that happen to its children.
|
||||
* Always set for dnotify and inotify.
|
||||
@@ -66,7 +65,6 @@
|
||||
#define FS_RENAME 0x10000000 /* File was renamed */
|
||||
#define FS_DN_MULTISHOT 0x20000000 /* dnotify multishot */
|
||||
#define FS_ISDIR 0x40000000 /* event occurred against dir */
|
||||
#define FS_IN_ONESHOT 0x80000000 /* only send event once */
|
||||
|
||||
#define FS_MOVE (FS_MOVED_FROM | FS_MOVED_TO)
|
||||
|
||||
@@ -106,8 +104,7 @@
|
||||
FS_ERROR)
|
||||
|
||||
/* Extra flags that may be reported with event or control handling of events */
|
||||
#define ALL_FSNOTIFY_FLAGS (FS_EXCL_UNLINK | FS_ISDIR | FS_IN_ONESHOT | \
|
||||
FS_DN_MULTISHOT | FS_EVENT_ON_CHILD)
|
||||
#define ALL_FSNOTIFY_FLAGS (FS_ISDIR | FS_EVENT_ON_CHILD | FS_DN_MULTISHOT)
|
||||
|
||||
#define ALL_FSNOTIFY_BITS (ALL_FSNOTIFY_EVENTS | ALL_FSNOTIFY_FLAGS)
|
||||
|
||||
@@ -473,9 +470,14 @@ struct fsnotify_mark {
|
||||
struct fsnotify_mark_connector *connector;
|
||||
/* Events types to ignore [mark->lock, group->mark_mutex] */
|
||||
__u32 ignored_mask;
|
||||
#define FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY 0x01
|
||||
#define FSNOTIFY_MARK_FLAG_ALIVE 0x02
|
||||
#define FSNOTIFY_MARK_FLAG_ATTACHED 0x04
|
||||
/* General fsnotify mark flags */
|
||||
#define FSNOTIFY_MARK_FLAG_ALIVE 0x0001
|
||||
#define FSNOTIFY_MARK_FLAG_ATTACHED 0x0002
|
||||
/* inotify mark flags */
|
||||
#define FSNOTIFY_MARK_FLAG_EXCL_UNLINK 0x0010
|
||||
#define FSNOTIFY_MARK_FLAG_IN_ONESHOT 0x0020
|
||||
/* fanotify mark flags */
|
||||
#define FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY 0x0100
|
||||
unsigned int flags; /* flags [mark->lock] */
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user