diff options
author | Matthew Wilcox <willy@linux.intel.com> | 2015-09-08 21:58:45 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-08 22:35:28 (GMT) |
commit | 4897c7655d9419ba7e62bac145ec6a1847134d93 (patch) | |
tree | 6d627db1b64dd2e99044aacb1700b8cf6e46f731 /include | |
parent | 7c414164593514f76b422faae0824bdd3754209b (diff) | |
download | linux-4897c7655d9419ba7e62bac145ec6a1847134d93.tar.xz |
thp: prepare for DAX huge pages
Add a vma_is_dax() helper macro to test whether the VMA is DAX, and use it
in zap_huge_pmd() and __split_huge_page_pmd().
[akpm@linux-foundation.org: fix build]
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Theodore Ts'o <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/dax.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/dax.h b/include/linux/dax.h index 4f27d3d..9b51f9d 100644 --- a/include/linux/dax.h +++ b/include/linux/dax.h @@ -18,4 +18,8 @@ int dax_pfn_mkwrite(struct vm_area_struct *, struct vm_fault *); #define dax_mkwrite(vma, vmf, gb, iod) dax_fault(vma, vmf, gb, iod) #define __dax_mkwrite(vma, vmf, gb, iod) __dax_fault(vma, vmf, gb, iod) +static inline bool vma_is_dax(struct vm_area_struct *vma) +{ + return vma->vm_file && IS_DAX(vma->vm_file->f_mapping->host); +} #endif |