dma_buf: no need to bother with file_inode()->i_mapping
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 20 Aug 2022 17:10:13 +0000 (13:10 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 1 Sep 2022 21:45:20 +0000 (17:45 -0400)
->f_mapping will do just fine

Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/dma-buf/udmabuf.c

index 38e8767ec371531695a8aed5fd77c26099389ce2..210473d927d8415cffc57aaa847c10ed5eb0fffd 100644 (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);