dma-buf: Use fdget()
Subsystems (2)
PATCH 1/1 dma-buf: Use fdget()
From: Ye Xingchen <[email protected]>
convert the fget() use to fdget().
Signed-off-by Ye Xingchen <[email protected]>
--- drivers/dma-buf/dma-buf.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-)
drivers/dma-buf/dma-buf.c +5 -7
@@ -729,19 +729,17 @@ EXPORT_SYMBOL_NS_GPL(dma_buf_fd, DMA_BUF);*/ struct dma_buf *dma_buf_get (int fd) { -struct file *file; - - file =fget (fd); +struct fd f =fdget (fd); -if (!file) +if (!f.file)return ERR_PTR (-EBADF ); -if (!is_dma_buf_file (file)) { -fput (file); +if (!is_dma_buf_file (f.file)) { +fdput (f);return ERR_PTR (-EINVAL ); } -return file->private_data; +return f.file->private_data; }EXPORT_SYMBOL_NS_GPL (dma_buf_get,DMA_BUF );
Signature · 1 line
2.25.
Al Viro
NAKQuoted 3 lines · On Fri, May 05, 2023 at 10:18:47AM +0800, [email protected] wrote:
From: Ye Xingchen <[email protected]>
convert the
fget()use tofdget().
NAK.