diff options
author | Eric Paris <eparis@redhat.com> | 2010-05-11 17:16:23 -0400 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-05-14 11:51:07 -0400 |
commit | 3dbc6fb6a3c8a7dc164ae330ab024a3fe65ae53e (patch) | |
tree | b04e140c78e644b18f7aa6ce31d59245dc39f0c0 | |
parent | e7b702b1a8f2a6961367da903217e669be0f099f (diff) |
inotify: clean up the inotify_add_watch out path
inotify_add_watch explictly frees the unused inode mark, but it can just
use the generic code. Just do that.
Signed-off-by: Eric Paris <eparis@redhat.com>
-rw-r--r-- | fs/notify/inotify/inotify_user.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 472cdf29ef82..40da732eb73c 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -578,16 +578,13 @@ retry: | |||
578 | /* return the watch descriptor for this new entry */ | 578 | /* return the watch descriptor for this new entry */ |
579 | ret = tmp_ientry->wd; | 579 | ret = tmp_ientry->wd; |
580 | 580 | ||
581 | /* match the ref from fsnotify_init_markentry() */ | ||
582 | fsnotify_put_mark(&tmp_ientry->fsn_entry); | ||
583 | |||
584 | /* if this mark added a new event update the group mask */ | 581 | /* if this mark added a new event update the group mask */ |
585 | if (mask & ~group->mask) | 582 | if (mask & ~group->mask) |
586 | fsnotify_recalc_group_mask(group); | 583 | fsnotify_recalc_group_mask(group); |
587 | 584 | ||
588 | out_err: | 585 | out_err: |
589 | if (ret < 0) | 586 | /* match the ref from fsnotify_init_markentry() */ |
590 | kmem_cache_free(inotify_inode_mark_cachep, tmp_ientry); | 587 | fsnotify_put_mark(&tmp_ientry->fsn_entry); |
591 | 588 | ||
592 | return ret; | 589 | return ret; |
593 | } | 590 | } |