Commit 3dbc6fb6 authored by Eric Paris's avatar Eric Paris

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: default avatarEric Paris <eparis@redhat.com>
parent e7b702b1
...@@ -578,16 +578,13 @@ retry: ...@@ -578,16 +578,13 @@ retry:
/* return the watch descriptor for this new entry */ /* return the watch descriptor for this new entry */
ret = tmp_ientry->wd; 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 this mark added a new event update the group mask */
if (mask & ~group->mask) if (mask & ~group->mask)
fsnotify_recalc_group_mask(group); fsnotify_recalc_group_mask(group);
out_err: out_err:
if (ret < 0) /* match the ref from fsnotify_init_markentry() */
kmem_cache_free(inotify_inode_mark_cachep, tmp_ientry); fsnotify_put_mark(&tmp_ientry->fsn_entry);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment