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:50 -0400 |
commit | 74be0cc82835aecad332a29896b0f212ba893403 (patch) | |
tree | eaae59c73ba52ff8cab8ee845e989d9877603f4c /fs/notify/inotify | |
parent | cac69dad32899c6f4c66bb4f9baf69b0d3c7d3d1 (diff) |
fsnotify: remove group_num altogether
The original fsnotify interface has a group-num which was intended to be
able to find a group after it was added. I no longer think this is a
necessary thing to do and so we remove the group_num.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/inotify')
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index cbe16df326f8..cae317f5bd9d 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -51,12 +51,6 @@ int inotify_max_user_watches __read_mostly; | |||
51 | static struct kmem_cache *inotify_inode_mark_cachep __read_mostly; | 51 | static struct kmem_cache *inotify_inode_mark_cachep __read_mostly; |
52 | struct kmem_cache *event_priv_cachep __read_mostly; | 52 | struct kmem_cache *event_priv_cachep __read_mostly; |
53 | 53 | ||
54 | /* | ||
55 | * When inotify registers a new group it increments this and uses that | ||
56 | * value as an offset to set the fsnotify group "name" and priority. | ||
57 | */ | ||
58 | static atomic_t inotify_grp_num; | ||
59 | |||
60 | #ifdef CONFIG_SYSCTL | 54 | #ifdef CONFIG_SYSCTL |
61 | 55 | ||
62 | #include <linux/sysctl.h> | 56 | #include <linux/sysctl.h> |
@@ -700,11 +694,8 @@ retry: | |||
700 | static struct fsnotify_group *inotify_new_group(struct user_struct *user, unsigned int max_events) | 694 | static struct fsnotify_group *inotify_new_group(struct user_struct *user, unsigned int max_events) |
701 | { | 695 | { |
702 | struct fsnotify_group *group; | 696 | struct fsnotify_group *group; |
703 | unsigned int grp_num; | ||
704 | 697 | ||
705 | /* fsnotify_obtain_group took a reference to group, we put this when we kill the file in the end */ | 698 | group = fsnotify_obtain_group(0, &inotify_fsnotify_ops); |
706 | grp_num = (INOTIFY_GROUP_NUM - atomic_inc_return(&inotify_grp_num)); | ||
707 | group = fsnotify_obtain_group(grp_num, 0, &inotify_fsnotify_ops); | ||
708 | if (IS_ERR(group)) | 699 | if (IS_ERR(group)) |
709 | return group; | 700 | return group; |
710 | 701 | ||