diff options
author | Eric Paris <eparis@redhat.com> | 2010-05-27 17:41:40 +0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 17:59:03 +0400 |
commit | 08ae89380a8210a9965d04083e1de78cb8bca4b1 (patch) | |
tree | 95ef9493b5a6152e7c683d2d5a8531844530f0f7 | |
parent | 269ed32a9ce00132b9372e9c00014532e054d6b2 (diff) | |
download | linux-08ae89380a8210a9965d04083e1de78cb8bca4b1.tar.xz |
fanotify: drop the useless priority argument
The priority argument in fanotify is useless. Kill it.
Signed-off-by: Eric Paris <eparis@redhat.com>
-rw-r--r-- | fs/notify/fanotify/fanotify_user.c | 8 | ||||
-rw-r--r-- | fs/notify/group.c | 10 | ||||
-rw-r--r-- | include/linux/fsnotify_backend.h | 1 | ||||
-rw-r--r-- | include/linux/syscalls.h | 3 |
4 files changed, 7 insertions, 15 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 7c869fa23ec6..664102084766 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c @@ -616,14 +616,13 @@ static int fanotify_add_inode_mark(struct fsnotify_group *group, } /* fanotify syscalls */ -SYSCALL_DEFINE3(fanotify_init, unsigned int, flags, unsigned int, event_f_flags, - unsigned int, priority) +SYSCALL_DEFINE2(fanotify_init, unsigned int, flags, unsigned int, event_f_flags) { struct fsnotify_group *group; int f_flags, fd; - pr_debug("%s: flags=%d event_f_flags=%d priority=%d\n", - __func__, flags, event_f_flags, priority); + pr_debug("%s: flags=%d event_f_flags=%d\n", + __func__, flags, event_f_flags); if (event_f_flags) return -EINVAL; @@ -645,7 +644,6 @@ SYSCALL_DEFINE3(fanotify_init, unsigned int, flags, unsigned int, event_f_flags, if (IS_ERR(group)) return PTR_ERR(group); - group->priority = priority; #ifdef CONFIG_FANOTIFY_ACCESS_PERMISSIONS mutex_init(&group->fanotify_data.access_mutex); init_waitqueue_head(&group->fanotify_data.access_waitq); diff --git a/fs/notify/group.c b/fs/notify/group.c index ada913fd4f7f..7ac65ed4735b 100644 --- a/fs/notify/group.c +++ b/fs/notify/group.c @@ -90,7 +90,6 @@ void fsnotify_recalc_group_mask(struct fsnotify_group *group) void fsnotify_add_vfsmount_group(struct fsnotify_group *group) { struct fsnotify_group *group_iter; - unsigned int priority = group->priority; mutex_lock(&fsnotify_grp_mutex); @@ -98,7 +97,7 @@ void fsnotify_add_vfsmount_group(struct fsnotify_group *group) list_for_each_entry(group_iter, &fsnotify_vfsmount_groups, vfsmount_group_list) { /* insert in front of this one? */ - if (priority < group_iter->priority) { + if (group < group_iter) { /* list_add_tail() insert in front of group_iter */ list_add_tail_rcu(&group->inode_group_list, &group_iter->inode_group_list); @@ -118,15 +117,14 @@ out: void fsnotify_add_inode_group(struct fsnotify_group *group) { struct fsnotify_group *group_iter; - unsigned int priority = group->priority; mutex_lock(&fsnotify_grp_mutex); - /* add to global group list, priority 0 first, UINT_MAX last */ + /* add to global group list */ if (!group->on_inode_group_list) { list_for_each_entry(group_iter, &fsnotify_inode_groups, inode_group_list) { - if (priority < group_iter->priority) { + if (group < group_iter) { /* list_add_tail() insert in front of group_iter */ list_add_tail_rcu(&group->inode_group_list, &group_iter->inode_group_list); @@ -260,8 +258,6 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops) spin_lock_init(&group->mark_lock); INIT_LIST_HEAD(&group->marks_list); - group->priority = UINT_MAX; - group->ops = ops; return group; diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h index b0d00fd6bfad..b9b3f24ad4fc 100644 --- a/include/linux/fsnotify_backend.h +++ b/include/linux/fsnotify_backend.h @@ -143,7 +143,6 @@ struct fsnotify_group { * a group */ struct list_head marks_list; /* all inode marks for this group */ - unsigned int priority; /* order of this group compared to others */ /* prevents double list_del of group_list. protected by global fsnotify_grp_mutex */ bool on_inode_group_list; bool on_vfsmount_group_list; diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 5b05c37059e9..0ec26a74f20a 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -813,8 +813,7 @@ asmlinkage long sys_pselect6(int, fd_set __user *, fd_set __user *, asmlinkage long sys_ppoll(struct pollfd __user *, unsigned int, struct timespec __user *, const sigset_t __user *, size_t); -asmlinkage long sys_fanotify_init(unsigned int flags, unsigned int event_f_flags, - unsigned int priority); +asmlinkage long sys_fanotify_init(unsigned int flags, unsigned int event_f_flags); asmlinkage long sys_fanotify_mark(int fanotify_fd, unsigned int flags, u64 mask, int fd, const char __user *pathname); |