diff options
Diffstat (limited to 'fs/notify/fanotify/fanotify.c')
-rw-r--r-- | fs/notify/fanotify/fanotify.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index 85366c78cc37..60c11c306fd9 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c | |||
@@ -200,10 +200,19 @@ static bool fanotify_should_send_event(struct fsnotify_group *group, | |||
200 | return false; | 200 | return false; |
201 | } | 201 | } |
202 | 202 | ||
203 | static void fanotify_free_group_priv(struct fsnotify_group *group) | ||
204 | { | ||
205 | struct user_struct *user; | ||
206 | |||
207 | user = group->fanotify_data.user; | ||
208 | atomic_dec(&user->fanotify_listeners); | ||
209 | free_uid(user); | ||
210 | } | ||
211 | |||
203 | const struct fsnotify_ops fanotify_fsnotify_ops = { | 212 | const struct fsnotify_ops fanotify_fsnotify_ops = { |
204 | .handle_event = fanotify_handle_event, | 213 | .handle_event = fanotify_handle_event, |
205 | .should_send_event = fanotify_should_send_event, | 214 | .should_send_event = fanotify_should_send_event, |
206 | .free_group_priv = NULL, | 215 | .free_group_priv = fanotify_free_group_priv, |
207 | .free_event_priv = NULL, | 216 | .free_event_priv = NULL, |
208 | .freeing_mark = NULL, | 217 | .freeing_mark = NULL, |
209 | }; | 218 | }; |