Commit 537621d9 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

fsnotify: Use pr_perror on inotify_add_watch error path

To get more detailed error desciption. Also print watchdog
number if it exceed expected, for better error output.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 7ed06099
...@@ -242,13 +242,13 @@ static int restore_one_inotify(int inotify_fd, struct fsnotify_mark_info *info) ...@@ -242,13 +242,13 @@ static int restore_one_inotify(int inotify_fd, struct fsnotify_mark_info *info)
while (wd >= 0) { while (wd >= 0) {
wd = inotify_add_watch(inotify_fd, path, iwe->mask); wd = inotify_add_watch(inotify_fd, path, iwe->mask);
if (wd < 0) { if (wd < 0) {
pr_err("Can't add watch for %d with %d\n", inotify_fd, iwe->wd); pr_perror("Can't add watch for %d with %d", inotify_fd, iwe->wd);
break; break;
} else if (wd == iwe->wd) { } else if (wd == iwe->wd) {
ret = 0; ret = 0;
break; break;
} else if (wd > iwe->wd) { } else if (wd > iwe->wd) {
pr_err("Unsorted watch found for %d with %d\n", inotify_fd, iwe->wd); pr_err("Unsorted watch %d found for %d with %d", wd, inotify_fd, iwe->wd);
break; break;
} }
......
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