notify_inotify: Slightly simplify inotify_watch
authorVolker Lendecke <vl@samba.org>
Mon, 27 Oct 2014 13:15:12 +0000 (13:15 +0000)
committerJeremy Allison <jra@samba.org>
Tue, 9 Dec 2014 03:12:09 +0000 (04:12 +0100)
commit01a167818d0d927dc9190e4c4b196a701110207e
tree3c080960ff3bafca3f734d768a5fe44741738bc1
parenteb10a36a96f5b4da4ab4677761b8dab7ceeec7b0
notify_inotify: Slightly simplify inotify_watch

tallocing first avoids having to call inotify_rm_watch

This even fixes a real error: We share inotifies between different instances,
so the rm_watch in the error paths destroys other legitimate watches

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/notify_inotify.c