diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index c17923f76a04..cb77c2e0ecbe 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -637,7 +637,9 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info) init_waitqueue_head(&dmabuf->poll); dmabuf->cb_excl.poll = dmabuf->cb_shared.poll = &dmabuf->poll; dmabuf->cb_excl.active = dmabuf->cb_shared.active = 0; +#if defined(CONFIG_DEBUG_FS) dmabuf->ktime = ktime_get(); +#endif atomic_set(&dmabuf->dent_count, 1); if (!resv) { diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index cd741e1557f6..7d76fd3d0cbf 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -441,7 +441,9 @@ struct dma_buf { const char *exp_name; const char *name; spinlock_t name_lock; +#if defined(CONFIG_DEBUG_FS) ktime_t ktime; +#endif struct module *owner; struct list_head list_node; void *priv;