Commit f89aa7f3 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Andrei Vagin

inotify: Fix open_*notify_fd() never fails

We ignore restore_one_*notify() error code, while we mustn't.
Make open function fail when we can't restore them.
Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 23dad982
......@@ -686,7 +686,7 @@ static int open_inotify_fd(struct file_desc *d, int *new_fd)
pr_info("\tRestore 0x%x wd for %#08x\n", wd_info->iwe->wd, wd_info->iwe->id);
if (restore_one_inotify(tmp, wd_info)) {
close_safe(&tmp);
break;
return -1;
}
pr_info("\t 0x%x wd for %#08x is restored\n", wd_info->iwe->wd, wd_info->iwe->id);
}
......@@ -723,7 +723,7 @@ static int open_fanotify_fd(struct file_desc *d, int *new_fd)
pr_info("\tRestore fanotify for %#08x\n", mark->fme->id);
if (restore_one_fanotify(ret, mark)) {
close_safe(&ret);
break;
return -1;
}
}
......
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