Commit 26aa2951 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

files: Enhance error message

While being debugging problem I found plain BUG_ON is not enough.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 33293222
...@@ -81,7 +81,11 @@ static inline struct file_desc *find_file_desc(FdinfoEntry *fe) ...@@ -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);
} }
......
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