fsnotify: Filter out internal inotify bits when restoring marks

The kernel prior 4.3 is exporting FS_EVENT_ON_CHILD
bit via procfs fdinfo interface. This bit is kernel's
internal and should not be passed in inotify_add_watch
call. Thus simply filter it out when obtain from old
images for backward compatibility reason.

More details here https://lkml.org/lkml/2015/9/21/680

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov 2015-10-12 20:18:07 +03:00 committed by Pavel Emelyanov
parent 9f631ad5c9
commit 61859d1176
2 changed files with 16 additions and 0 deletions

View file

@ -7,6 +7,8 @@
#include "protobuf.h"
#include "protobuf/fsnotify.pb-c.h"
#define KERNEL_FS_EVENT_ON_CHILD 0x08000000
struct fsnotify_params {
u32 faflags;
u32 evflags;