Commit 47091e4e authored by Al Viro's avatar Al Viro
Browse files

dma_buf_getfile(): don't bother with ->f_flags reassignments



just pass the already sanitized value to alloc_file_pseudo().

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 25885a35
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;