]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
fsnotify: add flags to fsnotify_mark_entries
authorEric Paris <eparis@redhat.com>
Fri, 18 Dec 2009 02:24:24 +0000 (21:24 -0500)
committerEric Paris <eparis@redhat.com>
Wed, 28 Jul 2010 13:58:52 +0000 (09:58 -0400)
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 <eparis@redhat.com>
fs/notify/inode_mark.c
include/linux/fsnotify_backend.h

index 6731408c49f7b3faddfe613ef4d3719f9d101260..b00065842b3e51bde65670e4abc116013d42cdbb 100644 (file)
@@ -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
index 0c0fd4ee284072cc2910ca38d66a7f67d311bf8f..cf165857199bfdf32e7618ca6c1c2a629ba8b8e7 100644 (file)
@@ -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 */
 };