Commit 93de6692 authored by Pavel Emelyanov's avatar Pavel Emelyanov

proc: Don't report error in case fdinfo for epoll fd is empty

This is normal situation -- eventpoll fd may have no fds attached
thus resulting in empty fdinfo file. Report OK in that case.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 278d83af
...@@ -824,13 +824,17 @@ int parse_fdinfo(int fd, int type, ...@@ -824,13 +824,17 @@ int parse_fdinfo(int fd, int type,
} }
fclose(f); fclose(f);
if (!entry_met) {
pr_err("No records of type %d found in fdinfo file\n", type);
goto parse_err;
}
if (entry_met)
return 0;
/*
* An eventpoll file may have no target fds set thus
* resulting in no tfd: lines in proc. This is normal.
*/
if (type == FD_TYPES__EVENTPOLL)
return 0; return 0;
pr_err("No records of type %d found in fdinfo file\n", type);
parse_err: parse_err:
pr_perror("%s: error parsing [%s] for %d\n", __func__, str, type); pr_perror("%s: error parsing [%s] for %d\n", __func__, str, type);
return -1; 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