From d5bdf54eab7130fae3f6b2e224da2842f9ec2a7c Mon Sep 17 00:00:00 2001 From: Cyrill Gorcunov Date: Wed, 16 Jan 2013 02:22:09 +0400 Subject: [PATCH] fsnotify: fanotify -- Fix object read procedure I occasionally read FanotifyMarkEntry object as InotifyWdEntry in collect_one_fanotify_mark, this didn't trigger a bug in test since the events are still occured (and before protobuf file refine the formats were close to each other), which means the fanotify00 test-case need to be updated (which is addressed in further patch). And don't forget to init fields. Signed-off-by: Cyrill Gorcunov Signed-off-by: Pavel Emelyanov --- fsnotify.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fsnotify.c b/fsnotify.c index 514c4108f..37fb84ac7 100644 --- a/fsnotify.c +++ b/fsnotify.c @@ -499,7 +499,10 @@ static int collect_one_fanotify_mark(void *o, ProtobufCMessage *msg) { struct fsnotify_mark_info *mark = o; - mark->iwe = pb_msg(msg, InotifyWdEntry); + mark->fme = pb_msg(msg, FanotifyMarkEntry); + INIT_LIST_HEAD(&mark->list); + mark->remap = NULL; + return collect_fanotify_mark(mark); }