[PATCH 11/11] dma-buf/sync_file: bring sync_dump() back

From: Gustavo Padovan
Date: Tue Jan 26 2016 - 13:32:43 EST


From: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>

During the de-stage of sync framework it was easy to keep sync_dump() out
to avoid an early de-stage of all debug code, but now that sync_debug.c
was de-staged bring sync_dump() back.

Signed-off-by: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
---
drivers/dma-buf/sync_file.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
index aa1215d..fd7e3b9 100644
--- a/drivers/dma-buf/sync_file.c
+++ b/drivers/dma-buf/sync_file.c
@@ -218,15 +218,19 @@ int sync_file_wait(struct sync_file *sync_file, long timeout)
if (ret < 0) {
return ret;
} else if (ret == 0) {
- if (timeout)
+ if (timeout) {
pr_info("sync_file timeout on [%p] after %dms\n",
sync_file, jiffies_to_msecs(timeout));
+ sync_dump();
+ }
return -ETIME;
}

ret = atomic_read(&sync_file->status);
- if (ret)
+ if (ret) {
pr_info("sync_file error %ld on [%p]\n", ret, sync_file);
+ sync_dump();
+ }

return ret;
}
--
2.5.0