mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
inotify: move control flags from mask to mark flags
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>
This commit is contained in:
parent
a32e697cda
commit
38035c04f5
5 changed files with 45 additions and 26 deletions
|
@ -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] */
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue