Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 098cf2fc authored by Eric Paris's avatar Eric Paris
Browse files

fsnotify: add flags to fsnotify_mark_entries



To differentiate between inode and vfsmount (or other future) types of
marks we add a flags field and set the inode bit on inode marks (the only
currently supported type of mark)

Signed-off-by: default avatarEric Paris <eparis@redhat.com>
parent 4136510d
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -322,6 +322,8 @@ int fsnotify_add_mark(struct fsnotify_mark_entry *entry,
	if (unlikely(!inode))
	if (unlikely(!inode))
		return -EINVAL;
		return -EINVAL;


	entry->flags = FSNOTIFY_MARK_FLAG_INODE;

	/*
	/*
	 * if this group isn't being testing for inode type events we need
	 * if this group isn't being testing for inode type events we need
	 * to start testing
	 * to start testing
+3 −0
Original line number Original line Diff line number Diff line
@@ -267,6 +267,9 @@ struct fsnotify_mark_entry {
		struct fsnotify_vfsmount_mark m;
		struct fsnotify_vfsmount_mark m;
	};
	};
	struct list_head free_g_list;	/* tmp list used when freeing this mark */
	struct list_head free_g_list;	/* tmp list used when freeing this mark */
#define FSNOTIFY_MARK_FLAG_INODE	0x01
#define FSNOTIFY_MARK_FLAG_VFSMOUNT	0x02
	unsigned int flags;		/* vfsmount or inode mark? */
	void (*free_mark)(struct fsnotify_mark_entry *entry); /* called on final put+free */
	void (*free_mark)(struct fsnotify_mark_entry *entry); /* called on final put+free */
};
};