fs: Constify vma argument to vma_is_dax
authorThomas Hellstrom (VMware) <thomas_os@shipmail.org>
Tue, 24 Mar 2020 17:46:48 +0000 (18:46 +0100)
committerThomas Hellstrom (VMware) <thomas_os@shipmail.org>
Tue, 24 Mar 2020 17:46:48 +0000 (18:46 +0100)
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 <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: "Jérôme Glisse" <jglisse@redhat.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Thomas Hellstrom (VMware) <thomas_os@shipmail.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Christian König <christian.koenig@amd.com>
include/linux/fs.h

index 3cd4fe6..2b38ce5 100644 (file)
@@ -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);
 }