Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp3248823ybf; Tue, 3 Mar 2020 02:25:39 -0800 (PST) X-Google-Smtp-Source: ADFU+vsf1YjHTtygjBfAxe5luRmTgOogIoWsmwzFaHHeumm9+mmhlocWt66RpJwprnYhwsyE84cv X-Received: by 2002:a9d:6ad1:: with SMTP id m17mr2695204otq.198.1583231139277; Tue, 03 Mar 2020 02:25:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583231139; cv=none; d=google.com; s=arc-20160816; b=WgDV+KnOIWRCQpn46wk/RhSHuL0/MYMmig52Nu2YoqFdrXRzZQW7E0WMxU6g4DZqPL wDxaIhaGW+hi/iERk+IIgh05PtX1Z5FaJaeZQQEMAkzzYPq0M7dbvuF1T7zUzI0Rx5C4 /GdpBTtnsbeuGf7JTBAROiHs/VmY3tayX2DagpEXDBEdeQGf9VhNngW8BVojVBivBTRm t8RvSgXN5O8chFIJc1iqs3I86kg7ohjMrHh5k02FwJexXxvk9L2iRhE32DtIcuHvk5pG JjHhQvFUv6eFVdYB9jYXivM2VjxjpxaUZdei9hYlsTt3QPnaTwMSgZKQqjVDYjIWNBfC /FOw== 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=94cnpv6WCzoRycwEPBeWWGXE24eTZBGCDypUPZo2gwE=; b=tqZarHMLDT6IXwR6l3E1yyPWHPwpC6+OHYVm5NX0/i+N9gORpGFd4AWvT5XvfDR+V0 56lZwJyWnGx9Q3LkGuv12T8dQ8g8YE6LD9H2Nsfl0UyJidpCDY+AwJgPhfKa9p+S/BzB bDhqviHfDcB2/bg68gHNE3i2QJ5Kc8t+nxuzb5ZdUGUXUy1esnbL7Z+1Hr0+3Q/FuHrL ukDd4vDZYK0gyKme+xj3DIX505J1gDfWRo9kCOFdAFRbQl3zw9DnYht2XMfC5SIjJmx+ vlNiIC1Iejl+t7c0X7rF2ZorEBPIb5dy4/rTbZ5NmNCxG7Dd48hGXXxf/R5pMgkkAKT2 yj0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@shipmail.org header.s=mail header.b=qBino2mt; 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 l7si4222762oil.31.2020.03.03.02.25.26; Tue, 03 Mar 2020 02:25:39 -0800 (PST) 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=qBino2mt; 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 S1728537AbgCCKXJ (ORCPT + 99 others); Tue, 3 Mar 2020 05:23:09 -0500 Received: from pio-pvt-msa1.bahnhof.se ([79.136.2.40]:53676 "EHLO pio-pvt-msa1.bahnhof.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728372AbgCCKXI (ORCPT ); Tue, 3 Mar 2020 05:23:08 -0500 Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTP id 115153F6D0; Tue, 3 Mar 2020 11:23:06 +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="qBino2mt"; 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 PvgsKhDRp34N; Tue, 3 Mar 2020 11:23:05 +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 9EBFA3F313; Tue, 3 Mar 2020 11:22:59 +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 E5CC0360366; Tue, 3 Mar 2020 11:22:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1583230979; bh=8QpzQ2ublJJs8/27qDaTvHB44L3rciEGT/yi+WqQA20=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qBino2mtNDn9MEUOuS7v3VA9Ik9iXNt5+MDjtavs4S1bXDjNRPSidurUroksSrR/c oJPWJxcGCpHD/5eCnjmrzLli2ctgcW9++xsY08erzE3vAux3eNO7cIObMrwCYBmxg2 I+8I91sT0KWaIdB1AN+eB8ak8rBBH1JhwVn1ehNg= 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 , 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 v5 1/9] fs: Constify vma argument to vma_is_dax Date: Tue, 3 Mar 2020 11:22:39 +0100 Message-Id: <20200303102247.4635-2-thomas_os@shipmail.org> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200303102247.4635-1-thomas_os@shipmail.org> References: <20200303102247.4635-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 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 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