mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-22 17:49:13 +00:00
fsnotify: don't dump fd, it is has queued evetns
Events are not dumped/restored. An idea of ignoring them isn't good. Signed-off-by: Andrey Vagin <avagin@openvz.org> Acked-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
ae3cb4fb1f
commit
4be6350cfb
1 changed files with 18 additions and 1 deletions
19
fsnotify.c
19
fsnotify.c
|
|
@ -231,7 +231,15 @@ static int dump_one_inotify(int lfd, u32 id, const struct fd_parms *p)
|
|||
struct watch_list wd_list = {.list = LIST_HEAD_INIT(wd_list.list), .n = 0};
|
||||
InotifyFileEntry ie = INOTIFY_FILE_ENTRY__INIT;
|
||||
union fdinfo_entries *we, *tmp;
|
||||
int exit_code = -1, i;
|
||||
int exit_code = -1, i, ret;
|
||||
|
||||
ret = fd_has_data(lfd);
|
||||
if (ret < 0)
|
||||
return -1;
|
||||
else if (ret > 0) {
|
||||
pr_err("The %d inotify has queued events\n", id);
|
||||
return -1;
|
||||
}
|
||||
|
||||
ie.id = id;
|
||||
ie.flags = p->flags;
|
||||
|
|
@ -337,6 +345,15 @@ static int dump_one_fanotify(int lfd, u32 id, const struct fd_parms *p)
|
|||
union fdinfo_entries *we, *tmp;
|
||||
int ret = -1, i;
|
||||
|
||||
ret = fd_has_data(lfd);
|
||||
if (ret < 0)
|
||||
return -1;
|
||||
else if (ret > 0) {
|
||||
pr_err("The %d inotify has queued events\n", id);
|
||||
return -1;
|
||||
}
|
||||
ret = -1;
|
||||
|
||||
fe.id = id;
|
||||
fe.flags = p->flags;
|
||||
fe.fown = (FownEntry *)&p->fown;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue