diff options
author | Eric Paris <eparis@redhat.com> | 2010-07-28 10:18:37 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 10:18:50 -0400 |
commit | f70ab54cc6c3907b0727ba332b3976f80f3846d0 (patch) | |
tree | 2a22097325a668a0d08d4ea3354d0e6c95fddd86 /fs/notify/inotify/inotify_user.c | |
parent | 5ba08e2eeb06355f66ed62ae97bb87d145973a9a (diff) |
fsnotify: fsnotify_add_notify_event should return an event
Rather than the horrific void ** argument and such just to pass the
fanotify_merge event back to the caller of fsnotify_add_notify_event() have
those things return an event if it was different than the event suggusted to
be added.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/inotify/inotify_user.c')
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 1068e1ca9cb0..a4cd227c4c76 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -516,7 +516,7 @@ void inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark, | |||
516 | struct fsnotify_group *group) | 516 | struct fsnotify_group *group) |
517 | { | 517 | { |
518 | struct inotify_inode_mark *i_mark; | 518 | struct inotify_inode_mark *i_mark; |
519 | struct fsnotify_event *ignored_event; | 519 | struct fsnotify_event *ignored_event, *notify_event; |
520 | struct inotify_event_private_data *event_priv; | 520 | struct inotify_event_private_data *event_priv; |
521 | struct fsnotify_event_private_data *fsn_event_priv; | 521 | struct fsnotify_event_private_data *fsn_event_priv; |
522 | int ret; | 522 | int ret; |
@@ -538,9 +538,14 @@ void inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark, | |||
538 | fsn_event_priv->group = group; | 538 | fsn_event_priv->group = group; |
539 | event_priv->wd = i_mark->wd; | 539 | event_priv->wd = i_mark->wd; |
540 | 540 | ||
541 | ret = fsnotify_add_notify_event(group, ignored_event, fsn_event_priv, NULL, NULL); | 541 | notify_event = fsnotify_add_notify_event(group, ignored_event, fsn_event_priv, NULL); |
542 | if (ret) | 542 | if (notify_event) { |
543 | if (IS_ERR(notify_event)) | ||
544 | ret = PTR_ERR(notify_event); | ||
545 | else | ||
546 | fsnotify_put_event(notify_event); | ||
543 | inotify_free_event_priv(fsn_event_priv); | 547 | inotify_free_event_priv(fsn_event_priv); |
548 | } | ||
544 | 549 | ||
545 | skip_send_ignore: | 550 | skip_send_ignore: |
546 | 551 | ||