diff options
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 68f7bec1e664..a6879d169241 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -513,13 +513,13 @@ void inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark, | |||
513 | struct fsnotify_event_private_data *fsn_event_priv; | 513 | struct fsnotify_event_private_data *fsn_event_priv; |
514 | int ret; | 514 | int ret; |
515 | 515 | ||
516 | i_mark = container_of(fsn_mark, struct inotify_inode_mark, fsn_mark); | ||
517 | |||
516 | ignored_event = fsnotify_create_event(NULL, FS_IN_IGNORED, NULL, | 518 | ignored_event = fsnotify_create_event(NULL, FS_IN_IGNORED, NULL, |
517 | FSNOTIFY_EVENT_NONE, NULL, 0, | 519 | FSNOTIFY_EVENT_NONE, NULL, 0, |
518 | GFP_NOFS); | 520 | GFP_NOFS); |
519 | if (!ignored_event) | 521 | if (!ignored_event) |
520 | return; | 522 | goto skip_send_ignore; |
521 | |||
522 | i_mark = container_of(fsn_mark, struct inotify_inode_mark, fsn_mark); | ||
523 | 523 | ||
524 | event_priv = kmem_cache_alloc(event_priv_cachep, GFP_NOFS); | 524 | event_priv = kmem_cache_alloc(event_priv_cachep, GFP_NOFS); |
525 | if (unlikely(!event_priv)) | 525 | if (unlikely(!event_priv)) |
@@ -541,9 +541,9 @@ void inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark, | |||
541 | } | 541 | } |
542 | 542 | ||
543 | skip_send_ignore: | 543 | skip_send_ignore: |
544 | |||
545 | /* matches the reference taken when the event was created */ | 544 | /* matches the reference taken when the event was created */ |
546 | fsnotify_put_event(ignored_event); | 545 | if (ignored_event) |
546 | fsnotify_put_event(ignored_event); | ||
547 | 547 | ||
548 | /* remove this mark from the idr */ | 548 | /* remove this mark from the idr */ |
549 | inotify_remove_from_idr(group, i_mark); | 549 | inotify_remove_from_idr(group, i_mark); |