2
0
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:
Cyrill Gorcunov 2012-07-28 09:11:12 +04:00 committed by Pavel Emelyanov
parent 33293222ba
commit 26aa295135

View File

@ -81,7 +81,11 @@ static inline struct file_desc *find_file_desc(FdinfoEntry *fe)
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,
struct fdinfo_list_entry, desc_list);
}