From: Eric Paris Date: Fri, 18 Dec 2009 02:24:24 +0000 (-0500) Subject: fsnotify: add flags to fsnotify_mark_entries X-Git-Tag: v3.12-rc1~9229^2~93 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=098cf2fc77ee190c92bf9d08d69a13305f2487ec;p=kernel%2Fkernel-generic.git 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: Eric Paris --- diff --git a/fs/notify/inode_mark.c b/fs/notify/inode_mark.c index 6731408..b000658 100644 --- a/fs/notify/inode_mark.c +++ b/fs/notify/inode_mark.c @@ -322,6 +322,8 @@ int fsnotify_add_mark(struct fsnotify_mark_entry *entry, if (unlikely(!inode)) return -EINVAL; + entry->flags = FSNOTIFY_MARK_FLAG_INODE; + /* * if this group isn't being testing for inode type events we need * to start testing diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 0c0fd4e..cf16585 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h @@ -267,6 +267,9 @@ struct fsnotify_mark_entry { struct fsnotify_vfsmount_mark m; }; 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 */ };