From 409aa4d675770f28e3fec16977842796f7caab62 Mon Sep 17 00:00:00 2001 From: Vijayanand Jitta Date: Tue, 23 Feb 2021 12:35:35 +0530 Subject: [PATCH] ANDROID: dma-buf: Export is_dma_buf_file Export is_dma_buf_file function which will be used by the minidump module to get dmabuf info. Bug: 199236943 Change-Id: Ic8f7dd4f0a620839ab19f52841e9a6541515133c Signed-off-by: Vijayanand Jitta --- drivers/dma-buf/dma-buf.c | 5 ++--- include/linux/dma-buf.h | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index f66df04de190..5f34343c2339 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -31,8 +31,6 @@ #include "dma-buf-sysfs-stats.h" -static inline int is_dma_buf_file(struct file *); - struct dma_buf_list { struct list_head head; struct mutex lock; @@ -429,10 +427,11 @@ static const struct file_operations dma_buf_fops = { /* * is_dma_buf_file - Check if struct file* is associated with dma_buf */ -static inline int is_dma_buf_file(struct file *file) +int is_dma_buf_file(struct file *file) { return file->f_op == &dma_buf_fops; } +EXPORT_SYMBOL_NS_GPL(is_dma_buf_file, MINIDUMP); static struct file *dma_buf_getfile(struct dma_buf *dmabuf, int flags) { diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index aea2c6a369e3..98002ed4c15e 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h @@ -666,6 +666,7 @@ dma_buf_attachment_is_dynamic(struct dma_buf_attachment *attach) return !!attach->importer_ops; } +int is_dma_buf_file(struct file *file); struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, struct device *dev); struct dma_buf_attachment *