diff options
author | Eric Paris <eparis@redhat.com> | 2010-05-11 23:16:23 +0200 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-05-14 17:51:07 +0200 |
commit | 3dbc6fb6a3c8a7dc164ae330ab024a3fe65ae53e (patch) | |
tree | b04e140c78e644b18f7aa6ce31d59245dc39f0c0 /fs | |
parent | Inotify: undefined reference to `anon_inode_getfd' (diff) | |
download | linux-3dbc6fb6a3c8a7dc164ae330ab024a3fe65ae53e.tar.xz linux-3dbc6fb6a3c8a7dc164ae330ab024a3fe65ae53e.zip |
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>
Diffstat (limited to 'fs')
-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: /* return the watch descriptor for this new entry */ ret = tmp_ientry->wd; - /* match the ref from fsnotify_init_markentry() */ - fsnotify_put_mark(&tmp_ientry->fsn_entry); - /* if this mark added a new event update the group mask */ if (mask & ~group->mask) fsnotify_recalc_group_mask(group); out_err: - if (ret < 0) - kmem_cache_free(inotify_inode_mark_cachep, tmp_ientry); + /* match the ref from fsnotify_init_markentry() */ + fsnotify_put_mark(&tmp_ientry->fsn_entry); return ret; } |