Commit 6586c468 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

fsnotify: Don't fail on old versions where no inotify/fanotify image present

Reported-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent e0e258c3
...@@ -512,6 +512,8 @@ int collect_inotify(void) ...@@ -512,6 +512,8 @@ int collect_inotify(void)
ret = collect_image(CR_FD_INOTIFY, PB_INOTIFY, ret = collect_image(CR_FD_INOTIFY, PB_INOTIFY,
sizeof(struct fsnotify_file_info), collect_one_inotify); sizeof(struct fsnotify_file_info), collect_one_inotify);
if (ret && errno == ENOENT)
return 0;
if (!ret) if (!ret)
ret = collect_image(CR_FD_INOTIFY_WD, PB_INOTIFY_WD, ret = collect_image(CR_FD_INOTIFY_WD, PB_INOTIFY_WD,
sizeof(struct fsnotify_mark_info), sizeof(struct fsnotify_mark_info),
...@@ -520,6 +522,8 @@ int collect_inotify(void) ...@@ -520,6 +522,8 @@ int collect_inotify(void)
ret = collect_image(CR_FD_FANOTIFY, PB_FANOTIFY, ret = collect_image(CR_FD_FANOTIFY, PB_FANOTIFY,
sizeof(struct fsnotify_file_info), sizeof(struct fsnotify_file_info),
collect_one_fanotify); collect_one_fanotify);
if (ret && errno == ENOENT)
return 0;
if (!ret) if (!ret)
ret = collect_image(CR_FD_FANOTIFY_MARK, PB_FANOTIFY_MARK, ret = collect_image(CR_FD_FANOTIFY_MARK, PB_FANOTIFY_MARK,
sizeof(struct fsnotify_mark_info), sizeof(struct fsnotify_mark_info),
......
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