#include <linux/inetdevice.h>
#include <linux/sched.h>
#include <linux/mm.h>
-#include <linux/fdtable.h>
#include <linux/swap.h>
#include <linux/wait.h>
#include <linux/mutex.h>
#include <wrapper/tracepoint.h>
#include <wrapper/genhd.h>
#include <wrapper/file.h>
-#include <wrapper/time.h>
+#include <wrapper/fdtable.h>
#ifdef CONFIG_LTTNG_HAS_LIST_IRQ
#include <linux/irq.h>
disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0);
while ((part = disk_part_iter_next(&piter))) {
+ struct block_device bdev;
char name_buf[BDEVNAME_SIZE];
- char *p;
+ const char *p;
+
+ /*
+ * Create a partial 'struct blockdevice' to use
+ * 'bdevname()' which is a simple wrapper over
+ * 'disk_name()' but has the honor to be EXPORT_SYMBOL.
+ */
+ bdev.bd_disk = disk;
+ bdev.bd_part = part;
- p = wrapper_disk_name(disk, part->partno, name_buf);
+ p = bdevname(&bdev, name_buf);
if (!p) {
disk_part_iter_exit(&piter);
class_dev_iter_exit(&iter);
do {
trace_lttng_statedump_process_state(session,
p, type, mode, submode, status, pid_ns);
- pid_ns = pid_ns->parent;
+ pid_ns = pid_ns ? pid_ns->parent : NULL;
} while (pid_ns);
}