From ff58105a47ede2e9f3fe6f45e9b1185dcfde7762 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 20 Aug 2022 13:10:13 -0400 Subject: dma_buf: no need to bother with file_inode()->i_mapping ->f_mapping will do just fine Reviewed-by: Christian Brauner (Microsoft) Signed-off-by: Al Viro --- drivers/dma-buf/udmabuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/dma-buf/udmabuf.c') diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index 38e8767ec371..210473d927d8 100644 --- a/drivers/dma-buf/udmabuf.c +++ b/drivers/dma-buf/udmabuf.c @@ -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); -- cgit v1.2.3