summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-03-14 14:48:00 +0100
committerJan Kara <jack@suse.cz>2017-04-10 17:37:35 +0200
commite911d8af87dba7642138f4320ca3db80629989f2 (patch)
treef6023831e4d1eae4e99bc4e389012ec70b897b45 /include/linux
parent86ffe245c430f07f95d5d28d3b694ea72f4492e7 (diff)
downloadlwn-e911d8af87dba7642138f4320ca3db80629989f2.tar.gz
lwn-e911d8af87dba7642138f4320ca3db80629989f2.zip
fsnotify: Make fsnotify_mark_connector hold inode reference
Currently inode reference is held by fsnotify marks. Change the rules so that inode reference is held by fsnotify_mark_connector structure whenever the list is non-empty. This simplifies the code and is more logical. Reviewed-by: Miklos Szeredi <mszeredi@redhat.com> Reviewed-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fsnotify_backend.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index 06f9a2cc1463..96333fb09309 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -196,8 +196,9 @@ struct fsnotify_group {
/*
* Inode / vfsmount point to this structure which tracks all marks attached to
- * the inode / vfsmount. The structure is freed only when inode / vfsmount gets
- * freed.
+ * the inode / vfsmount. The reference to inode / vfsmount is held by this
+ * structure whenever the list is non-empty. The structure is freed only when
+ * inode / vfsmount gets freed.
*/
struct fsnotify_mark_connector {
#define FSNOTIFY_OBJ_TYPE_INODE 0x01
@@ -245,10 +246,9 @@ struct fsnotify_mark {
struct fsnotify_mark_connector *connector;
/* Events types to ignore [mark->lock, group->mark_mutex] */
__u32 ignored_mask;
-#define FSNOTIFY_MARK_FLAG_OBJECT_PINNED 0x04
-#define FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY 0x08
-#define FSNOTIFY_MARK_FLAG_ALIVE 0x10
-#define FSNOTIFY_MARK_FLAG_ATTACHED 0x20
+#define FSNOTIFY_MARK_FLAG_IGNORED_SURV_MODIFY 0x01
+#define FSNOTIFY_MARK_FLAG_ALIVE 0x02
+#define FSNOTIFY_MARK_FLAG_ATTACHED 0x04
unsigned int flags; /* flags [mark->lock] */
void (*free_mark)(struct fsnotify_mark *mark); /* called on final put+free */
};