dma_buf: no need to bother with file_inode()->i_mapping

->f_mapping will do just fine

Reviewed-by: Christian Brauner (Microsoft) <[email protected]>
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Al Viro committed 2022-09-01 17:45:20 -04:00
1 parent 1f24cd31c2
commit ff58105a47
1 file changed
+1 -1
+1 -1
View File
@@ -210,7 +210,7 @@ static long udmabuf_create(struct miscdevice *device,
memfd = fget(list[i].memfd);
if (!memfd)
goto err;
mapping = file_inode(memfd)->i_mapping;
mapping = memfd->f_mapping;
if (!shmem_mapping(mapping) && !is_file_hugepages(memfd))
goto err;
seals = memfd_fcntl(memfd, F_GET_SEALS, 0);