mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-22 01:51:51 +00:00
files: Enhance error message
While being debugging problem I found plain BUG_ON is not enough. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
33293222ba
commit
26aa295135
6
files.c
6
files.c
@ -81,7 +81,11 @@ static inline struct file_desc *find_file_desc(FdinfoEntry *fe)
|
|||||||
|
|
||||||
struct fdinfo_list_entry *file_master(struct file_desc *d)
|
struct fdinfo_list_entry *file_master(struct file_desc *d)
|
||||||
{
|
{
|
||||||
BUG_ON(list_empty(&d->fd_info_head));
|
if (list_empty(&d->fd_info_head)) {
|
||||||
|
pr_err("Empty list on file desc id %#x\n", d->id);
|
||||||
|
BUG_ON(1);
|
||||||
|
}
|
||||||
|
|
||||||
return list_first_entry(&d->fd_info_head,
|
return list_first_entry(&d->fd_info_head,
|
||||||
struct fdinfo_list_entry, desc_list);
|
struct fdinfo_list_entry, desc_list);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user