Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp5223484ybb; Tue, 24 Mar 2020 13:12:20 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsPfSiOnmFhORRY3NYquv0+X7sO2CmMrhybVbNT+FZIdezDxeWSJCW3bBbjGEBJgzFNlihu X-Received: by 2002:aca:a895:: with SMTP id r143mr11794oie.150.1585080740470; Tue, 24 Mar 2020 13:12:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585080740; cv=none; d=google.com; s=arc-20160816; b=v/GNGY2/LoduITjFQscBe8O9fUz1Ju7py5h3ahJgzO8VijoOIc50b2+BbKjKS75Zws ZfZcCNR2WRc9v2/wEM33AZogq0DSuq4c+QXg+9hhs8Ss3fAh6oPSjkJJpkPM6a2WtMWs xqc8gGfGK1MI3gVOAffusVKAWn9SCNIXUfEhP81iMz1YDPw5ioZgGd8zOLDv3J3rZtUP edoEeVh4uE0/z5fawjXJNS/H2bSbPUpMCeFZSKt7NkVgZ2QuPeWjWyyVvHe4xEzycfq/ Usw86pouVk6ugslMrGyw02iM4TKLnYhxE5uAOpKF2hEZy3qsyspdY17Mq2NYP5IZ3nKQ PcPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JHalAcZf+yMaNGlrUisMfbSStxtC0A9fxbRL3egelWM=; b=lAR7bsk/Hc8SseGA281WZeeeUeYE5qshGMb8u1BGGZNvlPt2QfDAnDGPWneQb50AO7 +R4h/Xdm5+0OjQZo5NvDvP5oqgz8Z9jdukvrVn/JLkvFOp0RxJwCOL3h62lHL1QmV7vX hMy9mwcOPerXjz3SLr5/p03FsCCL9gEunwv1EY3QGaxs6ptSfS4p4WylgmKDe/ZIhGts lQD3JY2SsIVj5jj3ih8PCUJmEyri969guKuq1YdAydzXQRfCX1ni+eHWnBYnOCUXXtpA cshbHAuRZBUJw+1j6PkxV+VCF7Ljh0P+bKugAinJ3xLcB+OIxs53JaLF2Bh75fc1/f3x 8qqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@shipmail.org header.s=mail header.b=RVvi+5ZE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8si9193900otr.38.2020.03.24.13.12.07; Tue, 24 Mar 2020 13:12:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@shipmail.org header.s=mail header.b=RVvi+5ZE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727270AbgCXULp (ORCPT + 99 others); Tue, 24 Mar 2020 16:11:45 -0400 Received: from pio-pvt-msa1.bahnhof.se ([79.136.2.40]:60586 "EHLO pio-pvt-msa1.bahnhof.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbgCXULp (ORCPT ); Tue, 24 Mar 2020 16:11:45 -0400 Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTP id B4C1040735; Tue, 24 Mar 2020 21:11:42 +0100 (CET) Authentication-Results: pio-pvt-msa1.bahnhof.se; dkim=pass (1024-bit key; unprotected) header.d=shipmail.org header.i=@shipmail.org header.b="RVvi+5ZE"; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at bahnhof.se X-Spam-Flag: NO X-Spam-Score: -2.099 X-Spam-Level: X-Spam-Status: No, score=-2.099 tagged_above=-999 required=6.31 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Received: from pio-pvt-msa1.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa1.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eO960zhVeZGh; Tue, 24 Mar 2020 21:11:41 +0100 (CET) Received: from mail1.shipmail.org (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) (Authenticated sender: mb878879) by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTPA id 7D9FC4052C; Tue, 24 Mar 2020 21:11:38 +0100 (CET) Received: from localhost.localdomain.localdomain (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) by mail1.shipmail.org (Postfix) with ESMTPSA id B46033602F7; Tue, 24 Mar 2020 21:11:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1585080698; bh=iYRGvlrMx/ASdASJ84Pl19hk1Q5OTvbQxQY5Z288KuM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RVvi+5ZEwHoQCJgicJVVWv/JFpiZgFWj9mKUQ5N20FyV1XHSwezYqEX7od+5yRIID /VFHjzRPj5xSifZ8hirhT3GIVDpFBPGHIW2oElDZGcAoi48hc/djrohrsjPn8VyZFy yMHfHEcx3PJ82Ik+y05DSmRds9J3Gsaq9vtsV49s= From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m=20=28VMware=29?= To: linux-mm@kvack.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: pv-drivers@vmware.com, linux-graphics-maintainer@vmware.com, "Thomas Hellstrom (VMware)" , Andrew Morton , Michal Hocko , "Matthew Wilcox (Oracle)" , "Kirill A. Shutemov" , Ralph Campbell , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , =?UTF-8?q?Christian=20K=C3=B6nig?= , Dan Williams , Roland Scheidegger Subject: [PATCH v7 1/9] fs: Constify vma argument to vma_is_dax Date: Tue, 24 Mar 2020 21:11:15 +0100 Message-Id: <20200324201123.3118-2-thomas_os@shipmail.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200324201123.3118-1-thomas_os@shipmail.org> References: <20200324201123.3118-1-thomas_os@shipmail.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Thomas Hellstrom (VMware)" The function is used by upcoming vma_is_special_huge() with which we want to use a const vma argument. Since for vma_is_dax() the vma argument is only dereferenced for reading, constify it. Cc: Andrew Morton Cc: Michal Hocko Cc: "Matthew Wilcox (Oracle)" Cc: "Kirill A. Shutemov" Cc: Ralph Campbell Cc: "Jérôme Glisse" Cc: "Christian König" Cc: Dan Williams Signed-off-by: Thomas Hellstrom (VMware) Reviewed-by: Roland Scheidegger Acked-by: Christian König --- include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 3cd4fe6b845e..2b38ce5b73ad 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3391,7 +3391,7 @@ static inline bool io_is_direct(struct file *filp) return (filp->f_flags & O_DIRECT) || IS_DAX(filp->f_mapping->host); } -static inline bool vma_is_dax(struct vm_area_struct *vma) +static inline bool vma_is_dax(const struct vm_area_struct *vma) { return vma->vm_file && IS_DAX(vma->vm_file->f_mapping->host); } -- 2.21.1