diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-06-20 13:53:35 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2022-08-17 17:25:54 -0400 |
commit | 47091e4ed9af648d6cfa3a5f0809ece371294ecb (patch) | |
tree | 32be1494ea4fe139c6176c6ca5fd6a0d3046fb05 /drivers/dma-buf | |
parent | 25885a35a72007cf28ec5f9ba7169c5c798f7167 (diff) | |
download | linux-47091e4ed9af648d6cfa3a5f0809ece371294ecb.tar.gz linux-47091e4ed9af648d6cfa3a5f0809ece371294ecb.tar.bz2 linux-47091e4ed9af648d6cfa3a5f0809ece371294ecb.zip |
dma_buf_getfile(): don't bother with ->f_flags reassignments
just pass the already sanitized value to alloc_file_pseudo().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/dma-buf')
-rw-r--r-- | drivers/dma-buf/dma-buf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index efb4990b29e1..1b1c1c002b8d 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -531,11 +531,11 @@ static struct file *dma_buf_getfile(struct dma_buf *dmabuf, int flags) * value. */ inode->i_ino = atomic64_add_return(1, &dmabuf_inode); + flags &= O_ACCMODE | O_NONBLOCK; file = alloc_file_pseudo(inode, dma_buf_mnt, "dmabuf", flags, &dma_buf_fops); if (IS_ERR(file)) goto err_alloc_file; - file->f_flags = flags & (O_ACCMODE | O_NONBLOCK); file->private_data = dmabuf; file->f_path.dentry->d_fsdata = dmabuf; |