Skip to content

Commit 0d2e2a1

Browse files
committed
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>
1 parent 220d14d commit 0d2e2a1

6 files changed

Lines changed: 6 additions & 13 deletions

File tree

‎fs/notify/dnotify/dnotify.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ static int __init dnotify_init(void)
433433
dnotify_struct_cache = KMEM_CACHE(dnotify_struct, SLAB_PANIC);
434434
dnotify_mark_entry_cache = KMEM_CACHE(dnotify_mark_entry, SLAB_PANIC);
435435

436-
dnotify_group = fsnotify_alloc_group(0, &dnotify_fsnotify_ops);
436+
dnotify_group = fsnotify_alloc_group(&dnotify_fsnotify_ops);
437437
if (IS_ERR(dnotify_group))
438438
panic("unable to allocate fsnotify group for dnotify\n");
439439
return 0;

‎fs/notify/group.c‎

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
164164
/*
165165
* Create a new fsnotify_group and hold a reference for the group returned.
166166
*/
167-
struct fsnotify_group *fsnotify_alloc_group(__u32 mask,
168-
const struct fsnotify_ops *ops)
167+
struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
169168
{
170169
struct fsnotify_group *group;
171170

@@ -175,8 +174,6 @@ struct fsnotify_group *fsnotify_alloc_group(__u32 mask,
175174

176175
atomic_set(&group->refcnt, 1);
177176

178-
group->mask = mask;
179-
180177
mutex_init(&group->notification_mutex);
181178
INIT_LIST_HEAD(&group->notification_list);
182179
init_waitqueue_head(&group->notification_waitq);
@@ -196,8 +193,5 @@ struct fsnotify_group *fsnotify_alloc_group(__u32 mask,
196193

197194
mutex_unlock(&fsnotify_grp_mutex);
198195

199-
if (mask)
200-
fsnotify_recalc_global_mask();
201-
202196
return group;
203197
}

‎fs/notify/inotify/inotify_user.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ static struct fsnotify_group *inotify_new_group(struct user_struct *user, unsign
695695
{
696696
struct fsnotify_group *group;
697697

698-
group = fsnotify_alloc_group(0, &inotify_fsnotify_ops);
698+
group = fsnotify_alloc_group(&inotify_fsnotify_ops);
699699
if (IS_ERR(group))
700700
return group;
701701

‎include/linux/fsnotify_backend.h‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,7 @@ static inline void __fsnotify_d_instantiate(struct dentry *dentry, struct inode
305305
/* must call when a group changes its ->mask */
306306
extern void fsnotify_recalc_global_mask(void);
307307
/* get a reference to an existing or create a new group */
308-
extern struct fsnotify_group *fsnotify_alloc_group(__u32 mask,
309-
const struct fsnotify_ops *ops);
308+
extern struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops);
310309
/* run all marks associated with this group and update group->mask */
311310
extern void fsnotify_recalc_group_mask(struct fsnotify_group *group);
312311
/* drop reference on a group from fsnotify_alloc_group */

‎kernel/audit_tree.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@ static int __init audit_tree_init(void)
937937
{
938938
int i;
939939

940-
audit_tree_group = fsnotify_alloc_group(0, &audit_tree_ops);
940+
audit_tree_group = fsnotify_alloc_group(&audit_tree_ops);
941941
if (IS_ERR(audit_tree_group))
942942
audit_panic("cannot initialize fsnotify group for rectree watches");
943943

‎kernel/audit_watch.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ static const struct fsnotify_ops audit_watch_fsnotify_ops = {
585585

586586
static int __init audit_watch_init(void)
587587
{
588-
audit_watch_group = fsnotify_alloc_group(0, &audit_watch_fsnotify_ops);
588+
audit_watch_group = fsnotify_alloc_group(&audit_watch_fsnotify_ops);
589589
if (IS_ERR(audit_watch_group)) {
590590
audit_watch_group = NULL;
591591
audit_panic("cannot create audit fsnotify group");

0 commit comments

Comments
 (0)