From patchwork Sat Aug 20 20:19:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 12949822 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4A411C25B08 for ; Sat, 20 Aug 2022 20:36:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3011210E18D; Sat, 20 Aug 2022 20:36:22 +0000 (UTC) X-Greylist: delayed 1035 seconds by postgrey-1.36 at gabe; Sat, 20 Aug 2022 20:36:19 UTC Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by gabe.freedesktop.org (Postfix) with ESMTPS id 042C310E18D for ; Sat, 20 Aug 2022 20:36:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=f2B88BtT0BwDCUCOMm6ekzS3U/w1aqQ18CQ1ZZdJD/E=; b=t4V9+RqY7T7nt2AplXZGZuwMf7 s3qXoMRZHZiKje/YQV1Pfsc32jeoxb/0lO+zLdoFJaiQxul0jyhraOYDIoZDmJAM4/NUj/ucvtv+y nuc508sDx7XDqrE2PlAGqzyC2v4L03sey6n0yO+T2fJA2bwDTzslN0G8AcAb4hV+Cv5PJ08T2xbwH btzgXGsOTMIqHOGNdqb+QWXU9X0nboW7znR+9sc5xGqTx2NdqIMcRy+w9xJgCB0Ds54QJyKIGiDKN 2+xjRGY44/nrkUjd42RKHK5rSV+G92uTI12jCDdpmbVm/vaYcb9eO5bcgTL2PWwEtpRfowheUmqzj 7FatFZyg==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oPUvs-006TBb-7J; Sat, 20 Aug 2022 20:19:00 +0000 Date: Sat, 20 Aug 2022 21:19:00 +0100 From: Al Viro To: linux-fsdevel@vger.kernel.org Subject: [PATCH 6/8] dma_buf: no need to bother with file_inode()->i_mapping Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" ->f_mapping will do just fine Signed-off-by: Al Viro --- drivers/dma-buf/udmabuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);