summaryrefslogtreecommitdiffstats
path: root/source3/smbd/notify_inotify.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-11-05 12:18:31 +0000
committerJeremy Allison <jra@samba.org>2014-12-09 04:12:09 +0100
commita5a5326152a090e737201612f5e29a7ecc457c85 (patch)
tree9486a80df63c58bab19c0ec2d63a83d58e532f74 /source3/smbd/notify_inotify.c
parentde4a1c90a70b31f99e987fa109683862bd0823d1 (diff)
downloadsamba-a5a5326152a090e737201612f5e29a7ecc457c85.tar.gz
samba-a5a5326152a090e737201612f5e29a7ecc457c85.tar.xz
samba-a5a5326152a090e737201612f5e29a7ecc457c85.zip
notify_inotify: inotify_watch now takes a mem_ctx
This will make it easier to integrate into proper memory hierarchies. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/notify_inotify.c')
-rw-r--r--source3/smbd/notify_inotify.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c
index a3c30f1431..fedf9b522f 100644
--- a/source3/smbd/notify_inotify.c
+++ b/source3/smbd/notify_inotify.c
@@ -348,7 +348,8 @@ static int watch_destructor(struct inotify_watch_context *w)
add a watch. The watch is removed when the caller calls
talloc_free() on *handle
*/
-int inotify_watch(struct sys_notify_context *ctx,
+int inotify_watch(TALLOC_CTX *mem_ctx,
+ struct sys_notify_context *ctx,
const char *path,
uint32_t *filter,
uint32_t *subdir_filter,
@@ -385,7 +386,7 @@ int inotify_watch(struct sys_notify_context *ctx,
watch descriptor for multiple watches on the same path */
mask |= (IN_MASK_ADD | IN_ONLYDIR);
- w = talloc(in, struct inotify_watch_context);
+ w = talloc(mem_ctx, struct inotify_watch_context);
if (w == NULL) {
*filter = orig_filter;
return ENOMEM;