Commit b6e3223a authored by Pavel Emelyanov's avatar Pavel Emelyanov

locks: Don't skip out-of-tree flocks

These guys may have pids that are not met in pstree.
This is not the reason for skipping those, try to
resolve flocks anyway.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent e523b371
......@@ -91,9 +91,13 @@ int dump_file_locks(void)
list_for_each_entry(fl, &file_lock_list, list) {
if (fl->real_owner == -1) {
pr_err("Unresolved lock found pid %d ino %ld\n",
fl->fl_owner, fl->i_no);
return -1;
if (fl->fl_kind == FL_POSIX) {
pr_err("Unresolved lock found pid %d ino %ld\n",
fl->fl_owner, fl->i_no);
return -1;
}
continue;
}
file_lock_entry__init(&fle);
......
......@@ -1500,7 +1500,15 @@ int parse_file_locks(void)
goto err;
}
if (!pid_in_pstree(fl->fl_owner)) {
if (fl->fl_kind == FL_UNKNOWN) {
pr_err("Unknown file lock!\n");
ret = -1;
xfree(fl);
goto err;
}
if ((fl->fl_kind == FL_POSIX) &&
!pid_in_pstree(fl->fl_owner)) {
/*
* We only care about tasks which are taken
* into dump, so we only collect file locks
......@@ -1510,13 +1518,6 @@ int parse_file_locks(void)
continue;
}
if (fl->fl_kind == FL_UNKNOWN) {
pr_err("Unknown file lock!\n");
ret = -1;
xfree(fl);
goto err;
}
if (is_blocked) {
/*
* Here the task is in the pstree.
......
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