diff options
author | Eric Paris <eparis@redhat.com> | 2009-12-17 21:24:22 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 09:58:51 -0400 |
commit | 0d2e2a1d00d7d23e5bd9bb0935cde7c3d5835c56 (patch) | |
tree | 1c6bbbcbb143a364838d6749aa086af3c019f965 | |
parent | 220d14df0dc587c06b97762829a41157c9375b94 (diff) |
fsnotify: drop mask argument from fsnotify_alloc_group
Nothing uses the mask argument to fsnotify_alloc_group. This patch drops
that argument.
Signed-off-by: Eric Paris <eparis@redhat.com>
-rw-r--r-- | fs/notify/dnotify/dnotify.c | 2 | ||||
-rw-r--r-- | fs/notify/group.c | 8 | ||||
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 2 | ||||
-rw-r--r-- | include/linux/fsnotify_backend.h | 3 | ||||
-rw-r--r-- | kernel/audit_tree.c | 2 | ||||
-rw-r--r-- | kernel/audit_watch.c | 2 |
6 files changed, 6 insertions, 13 deletions
diff --git a/fs/notify/dnotify/dnotify.c b/fs/notify/dnotify/dnotify.c index 51e4fe33d6bb..e0a847bd53be 100644 --- a/fs/notify/dnotify/dnotify.c +++ b/fs/notify/dnotify/dnotify.c | |||
@@ -433,7 +433,7 @@ static int __init dnotify_init(void) | |||
433 | dnotify_struct_cache = KMEM_CACHE(dnotify_struct, SLAB_PANIC); | 433 | dnotify_struct_cache = KMEM_CACHE(dnotify_struct, SLAB_PANIC); |
434 | dnotify_mark_entry_cache = KMEM_CACHE(dnotify_mark_entry, SLAB_PANIC); | 434 | dnotify_mark_entry_cache = KMEM_CACHE(dnotify_mark_entry, SLAB_PANIC); |
435 | 435 | ||
436 | dnotify_group = fsnotify_alloc_group(0, &dnotify_fsnotify_ops); | 436 | dnotify_group = fsnotify_alloc_group(&dnotify_fsnotify_ops); |
437 | if (IS_ERR(dnotify_group)) | 437 | if (IS_ERR(dnotify_group)) |
438 | panic("unable to allocate fsnotify group for dnotify\n"); | 438 | panic("unable to allocate fsnotify group for dnotify\n"); |
439 | return 0; | 439 | return 0; |
diff --git a/fs/notify/group.c b/fs/notify/group.c index 1d20d26d5fee..1657349c30a6 100644 --- a/fs/notify/group.c +++ b/fs/notify/group.c | |||
@@ -164,8 +164,7 @@ void fsnotify_put_group(struct fsnotify_group *group) | |||
164 | /* | 164 | /* |
165 | * Create a new fsnotify_group and hold a reference for the group returned. | 165 | * Create a new fsnotify_group and hold a reference for the group returned. |
166 | */ | 166 | */ |
167 | struct fsnotify_group *fsnotify_alloc_group(__u32 mask, | 167 | struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops) |
168 | const struct fsnotify_ops *ops) | ||
169 | { | 168 | { |
170 | struct fsnotify_group *group; | 169 | struct fsnotify_group *group; |
171 | 170 | ||
@@ -175,8 +174,6 @@ struct fsnotify_group *fsnotify_alloc_group(__u32 mask, | |||
175 | 174 | ||
176 | atomic_set(&group->refcnt, 1); | 175 | atomic_set(&group->refcnt, 1); |
177 | 176 | ||
178 | group->mask = mask; | ||
179 | |||
180 | mutex_init(&group->notification_mutex); | 177 | mutex_init(&group->notification_mutex); |
181 | INIT_LIST_HEAD(&group->notification_list); | 178 | INIT_LIST_HEAD(&group->notification_list); |
182 | init_waitqueue_head(&group->notification_waitq); | 179 | init_waitqueue_head(&group->notification_waitq); |
@@ -196,8 +193,5 @@ struct fsnotify_group *fsnotify_alloc_group(__u32 mask, | |||
196 | 193 | ||
197 | mutex_unlock(&fsnotify_grp_mutex); | 194 | mutex_unlock(&fsnotify_grp_mutex); |
198 | 195 | ||
199 | if (mask) | ||
200 | fsnotify_recalc_global_mask(); | ||
201 | |||
202 | return group; | 196 | return group; |
203 | } | 197 | } |
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 25a2854186e9..a48d68a68b25 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -695,7 +695,7 @@ static struct fsnotify_group *inotify_new_group(struct user_struct *user, unsign | |||
695 | { | 695 | { |
696 | struct fsnotify_group *group; | 696 | struct fsnotify_group *group; |
697 | 697 | ||
698 | group = fsnotify_alloc_group(0, &inotify_fsnotify_ops); | 698 | group = fsnotify_alloc_group(&inotify_fsnotify_ops); |
699 | if (IS_ERR(group)) | 699 | if (IS_ERR(group)) |
700 | return group; | 700 | return group; |
701 | 701 | ||
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index 7d3c03e46862..58326049ab29 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h | |||
@@ -305,8 +305,7 @@ static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode | |||
305 | /* must call when a group changes its ->mask */ | 305 | /* must call when a group changes its ->mask */ |
306 | extern void fsnotify_recalc_global_mask(void); | 306 | extern void fsnotify_recalc_global_mask(void); |
307 | /* get a reference to an existing or create a new group */ | 307 | /* get a reference to an existing or create a new group */ |
308 | extern struct fsnotify_group *fsnotify_alloc_group(__u32 mask, | 308 | extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops); |
309 | const struct fsnotify_ops *ops); | ||
310 | /* run all marks associated with this group and update group->mask */ | 309 | /* run all marks associated with this group and update group->mask */ |
311 | extern void fsnotify_recalc_group_mask(struct fsnotify_group *group); | 310 | extern void fsnotify_recalc_group_mask(struct fsnotify_group *group); |
312 | /* drop reference on a group from fsnotify_alloc_group */ | 311 | /* drop reference on a group from fsnotify_alloc_group */ |
diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c index 813274d4edad..04f16887406b 100644 --- a/kernel/audit_tree.c +++ b/kernel/audit_tree.c | |||
@@ -937,7 +937,7 @@ static int __init audit_tree_init(void) | |||
937 | { | 937 | { |
938 | int i; | 938 | int i; |
939 | 939 | ||
940 | audit_tree_group = fsnotify_alloc_group(0, &audit_tree_ops); | 940 | audit_tree_group = fsnotify_alloc_group(&audit_tree_ops); |
941 | if (IS_ERR(audit_tree_group)) | 941 | if (IS_ERR(audit_tree_group)) |
942 | audit_panic("cannot initialize fsnotify group for rectree watches"); | 942 | audit_panic("cannot initialize fsnotify group for rectree watches"); |
943 | 943 | ||
diff --git a/kernel/audit_watch.c b/kernel/audit_watch.c index 87408b282118..83d5f9674cec 100644 --- a/kernel/audit_watch.c +++ b/kernel/audit_watch.c | |||
@@ -585,7 +585,7 @@ static const struct fsnotify_ops audit_watch_fsnotify_ops = { | |||
585 | 585 | ||
586 | static int __init audit_watch_init(void) | 586 | static int __init audit_watch_init(void) |
587 | { | 587 | { |
588 | audit_watch_group = fsnotify_alloc_group(0, &audit_watch_fsnotify_ops); | 588 | audit_watch_group = fsnotify_alloc_group(&audit_watch_fsnotify_ops); |
589 | if (IS_ERR(audit_watch_group)) { | 589 | if (IS_ERR(audit_watch_group)) { |
590 | audit_watch_group = NULL; | 590 | audit_watch_group = NULL; |
591 | audit_panic("cannot create audit fsnotify group"); | 591 | audit_panic("cannot create audit fsnotify group"); |