mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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>
This commit is contained in:
parent
25885a35a7
commit
47091e4ed9
1 changed files with 1 additions and 1 deletions
|
@ -531,11 +531,11 @@ static struct file *dma_buf_getfile(struct dma_buf *dmabuf, int flags)
|
||||||
* value.
|
* value.
|
||||||
*/
|
*/
|
||||||
inode->i_ino = atomic64_add_return(1, &dmabuf_inode);
|
inode->i_ino = atomic64_add_return(1, &dmabuf_inode);
|
||||||
|
flags &= O_ACCMODE | O_NONBLOCK;
|
||||||
file = alloc_file_pseudo(inode, dma_buf_mnt, "dmabuf",
|
file = alloc_file_pseudo(inode, dma_buf_mnt, "dmabuf",
|
||||||
flags, &dma_buf_fops);
|
flags, &dma_buf_fops);
|
||||||
if (IS_ERR(file))
|
if (IS_ERR(file))
|
||||||
goto err_alloc_file;
|
goto err_alloc_file;
|
||||||
file->f_flags = flags & (O_ACCMODE | O_NONBLOCK);
|
|
||||||
file->private_data = dmabuf;
|
file->private_data = dmabuf;
|
||||||
file->f_path.dentry->d_fsdata = dmabuf;
|
file->f_path.dentry->d_fsdata = dmabuf;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue