From: Eric Paris Date: Tue, 11 May 2010 21:16:23 +0000 (-0400) Subject: inotify: clean up the inotify_add_watch out path X-Git-Tag: v2.6.34~13^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3dbc6fb6a3c8a7dc164ae330ab024a3fe65ae53e;p=platform%2Fkernel%2Flinux-3.10.git 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 --- diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index 472cdf2..40da732 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; }