]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
fsnotify: drop mask argument from fsnotify_alloc_group
authorEric Paris <eparis@redhat.com>
Fri, 18 Dec 2009 02:24:22 +0000 (21:24 -0500)
committerEric Paris <eparis@redhat.com>
Wed, 28 Jul 2010 13:58:51 +0000 (09:58 -0400)
Nothing uses the mask argument to fsnotify_alloc_group.  This patch drops
that argument.

Signed-off-by: Eric Paris <eparis@redhat.com>
fs/notify/dnotify/dnotify.c
fs/notify/group.c
fs/notify/inotify/inotify_user.c
include/linux/fsnotify_backend.h
kernel/audit_tree.c
kernel/audit_watch.c

index 51e4fe33d6bb2224d4cce8f05939a969f2a1e35a..e0a847bd53bea7cbeb5111a2b812bbe612573184 100644 (file)
@@ -433,7 +433,7 @@ static int __init dnotify_init(void)
        dnotify_struct_cache = KMEM_CACHE(dnotify_struct, SLAB_PANIC);
        dnotify_mark_entry_cache = KMEM_CACHE(dnotify_mark_entry, SLAB_PANIC);
 
-       dnotify_group = fsnotify_alloc_group(0, &dnotify_fsnotify_ops);
+       dnotify_group = fsnotify_alloc_group(&dnotify_fsnotify_ops);
        if (IS_ERR(dnotify_group))
                panic("unable to allocate fsnotify group for dnotify\n");
        return 0;
index 1d20d26d5fee18f89f41cfcd0d6e35a1c00bb16a..1657349c30a63d5b29b46512daaa063cd7fe3d0a 100644 (file)
@@ -164,8 +164,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
 /*
  * Create a new fsnotify_group and hold a reference for the group returned.
  */
-struct fsnotify_group *fsnotify_alloc_group(__u32 mask,
-                                           const struct fsnotify_ops *ops)
+struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
 {
        struct fsnotify_group *group;
 
@@ -175,8 +174,6 @@ struct fsnotify_group *fsnotify_alloc_group(__u32 mask,
 
        atomic_set(&group->refcnt, 1);
 
-       group->mask = mask;
-
        mutex_init(&group->notification_mutex);
        INIT_LIST_HEAD(&group->notification_list);
        init_waitqueue_head(&group->notification_waitq);
@@ -196,8 +193,5 @@ struct fsnotify_group *fsnotify_alloc_group(__u32 mask,
 
        mutex_unlock(&fsnotify_grp_mutex);
 
-       if (mask)
-               fsnotify_recalc_global_mask();
-
        return group;
 }
index 25a2854186e9178bee550d9955f6df970ca97fd1..a48d68a68b2574b63245d168a31ebed70f9feadf 100644 (file)
@@ -695,7 +695,7 @@ static struct fsnotify_group *inotify_new_group(struct user_struct *user, unsign
 {
        struct fsnotify_group *group;
 
-       group = fsnotify_alloc_group(0, &inotify_fsnotify_ops);
+       group = fsnotify_alloc_group(&inotify_fsnotify_ops);
        if (IS_ERR(group))
                return group;
 
index 7d3c03e46862e502982798c572de270bfc239de9..58326049ab297292eee5479e9ba7775c0ecdabfb 100644 (file)
@@ -305,8 +305,7 @@ static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode
 /* must call when a group changes its ->mask */
 extern void fsnotify_recalc_global_mask(void);
 /* get a reference to an existing or create a new group */
-extern struct fsnotify_group *fsnotify_alloc_group(__u32 mask,
-                                                   const struct fsnotify_ops *ops);
+extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops);
 /* run all marks associated with this group and update group->mask */
 extern void fsnotify_recalc_group_mask(struct fsnotify_group *group);
 /* drop reference on a group from fsnotify_alloc_group */
index 813274d4edada354394d9b94387f9c61b87dcf9b..04f16887406bbe7bf9bc3fe5a2ee3261660a8300 100644 (file)
@@ -937,7 +937,7 @@ static int __init audit_tree_init(void)
 {
        int i;
 
-       audit_tree_group = fsnotify_alloc_group(0, &audit_tree_ops);
+       audit_tree_group = fsnotify_alloc_group(&audit_tree_ops);
        if (IS_ERR(audit_tree_group))
                audit_panic("cannot initialize fsnotify group for rectree watches");
 
index 87408b2821184aa5958bbe2aecb255bed77cef8a..83d5f9674ceca0eb612db20e9cfe9876269c1677 100644 (file)
@@ -585,7 +585,7 @@ static const struct fsnotify_ops audit_watch_fsnotify_ops = {
 
 static int __init audit_watch_init(void)
 {
-       audit_watch_group = fsnotify_alloc_group(0, &audit_watch_fsnotify_ops);
+       audit_watch_group = fsnotify_alloc_group(&audit_watch_fsnotify_ops);
        if (IS_ERR(audit_watch_group)) {
                audit_watch_group = NULL;
                audit_panic("cannot create audit fsnotify group");