2022-06-25 11:20:31

by Jason A. Donenfeld

[permalink] [raw]
Subject: [PATCH v2 7/8] dma-buf: remove useless FMODE_LSEEK flag

This is already set by anon_inode_getfile(), since dma_buf_fops has
non-NULL ->llseek, so we don't need to set it here too.

Suggested-by: Al Viro <[email protected]>
Cc: Sumit Semwal <[email protected]>
Cc: Christian König <[email protected]>
Cc: [email protected]
Signed-off-by: Jason A. Donenfeld <[email protected]>
---
drivers/dma-buf/dma-buf.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 32f55640890c..3f08e0b960ec 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -549,7 +549,6 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)
goto err_dmabuf;
}

- file->f_mode |= FMODE_LSEEK;
dmabuf->file = file;

mutex_init(&dmabuf->lock);
--
2.35.1


2022-06-27 09:17:11

by Daniel Vetter

[permalink] [raw]
Subject: Re: [PATCH v2 7/8] dma-buf: remove useless FMODE_LSEEK flag

On Sat, Jun 25, 2022 at 01:01:14PM +0200, Jason A. Donenfeld wrote:
> This is already set by anon_inode_getfile(), since dma_buf_fops has
> non-NULL ->llseek, so we don't need to set it here too.
>
> Suggested-by: Al Viro <[email protected]>
> Cc: Sumit Semwal <[email protected]>
> Cc: Christian K?nig <[email protected]>
> Cc: [email protected]
> Signed-off-by: Jason A. Donenfeld <[email protected]>

I'm assuming this is part of a vfs cleanup and lands through that tree?
For that:

Acked-by: Daniel Vetter <[email protected]>

> ---
> drivers/dma-buf/dma-buf.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> index 32f55640890c..3f08e0b960ec 100644
> --- a/drivers/dma-buf/dma-buf.c
> +++ b/drivers/dma-buf/dma-buf.c
> @@ -549,7 +549,6 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)
> goto err_dmabuf;
> }
>
> - file->f_mode |= FMODE_LSEEK;
> dmabuf->file = file;
>
> mutex_init(&dmabuf->lock);
> --
> 2.35.1
>

--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

2022-06-27 10:14:25

by Jason A. Donenfeld

[permalink] [raw]
Subject: Re: [PATCH v2 7/8] dma-buf: remove useless FMODE_LSEEK flag

Hi Daniel,

On Mon, Jun 27, 2022 at 11:08:32AM +0200, Daniel Vetter wrote:
> On Sat, Jun 25, 2022 at 01:01:14PM +0200, Jason A. Donenfeld wrote:
> > This is already set by anon_inode_getfile(), since dma_buf_fops has
> > non-NULL ->llseek, so we don't need to set it here too.
> >
> > Suggested-by: Al Viro <[email protected]>
> > Cc: Sumit Semwal <[email protected]>
> > Cc: Christian König <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Jason A. Donenfeld <[email protected]>
>
> I'm assuming this is part of a vfs cleanup and lands through that tree?
> For that:
>
> Acked-by: Daniel Vetter <[email protected]>

With the exception of the first patch (which is more urgent), yes, that
is my assumption too.

Jason

2022-06-29 11:16:53

by Sumit Semwal

[permalink] [raw]
Subject: Re: [PATCH v2 7/8] dma-buf: remove useless FMODE_LSEEK flag

On Mon, 27 Jun 2022 at 14:38, Daniel Vetter <[email protected]> wrote:
>
> On Sat, Jun 25, 2022 at 01:01:14PM +0200, Jason A. Donenfeld wrote:
> > This is already set by anon_inode_getfile(), since dma_buf_fops has
> > non-NULL ->llseek, so we don't need to set it here too.
> >
> > Suggested-by: Al Viro <[email protected]>
> > Cc: Sumit Semwal <[email protected]>
> > Cc: Christian König <[email protected]>
> > Cc: [email protected]
> > Signed-off-by: Jason A. Donenfeld <[email protected]>
>
> I'm assuming this is part of a vfs cleanup and lands through that tree?
> For that:
>
> Acked-by: Daniel Vetter <[email protected]>
FWIW, please feel free to add
Acked-by: Sumit Semwal <[email protected]>

>
> > ---
> > drivers/dma-buf/dma-buf.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
> > index 32f55640890c..3f08e0b960ec 100644
> > --- a/drivers/dma-buf/dma-buf.c
> > +++ b/drivers/dma-buf/dma-buf.c
> > @@ -549,7 +549,6 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)
> > goto err_dmabuf;
> > }
> >
> > - file->f_mode |= FMODE_LSEEK;
> > dmabuf->file = file;
> >
> > mutex_init(&dmabuf->lock);
> > --
> > 2.35.1
> >
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch


Best,
Sumit.