diff options
Diffstat (limited to 'mm/truncate.c')
-rw-r--r-- | mm/truncate.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mm/truncate.c b/mm/truncate.c index 83a059e8cd1d..706cff171a15 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -67,17 +67,14 @@ static void truncate_exceptional_entry(struct address_space *mapping, | |||
67 | 67 | ||
68 | /* | 68 | /* |
69 | * Invalidate exceptional entry if easily possible. This handles exceptional | 69 | * Invalidate exceptional entry if easily possible. This handles exceptional |
70 | * entries for invalidate_inode_pages() so for DAX it evicts only unlocked and | 70 | * entries for invalidate_inode_pages(). |
71 | * clean entries. | ||
72 | */ | 71 | */ |
73 | static int invalidate_exceptional_entry(struct address_space *mapping, | 72 | static int invalidate_exceptional_entry(struct address_space *mapping, |
74 | pgoff_t index, void *entry) | 73 | pgoff_t index, void *entry) |
75 | { | 74 | { |
76 | /* Handled by shmem itself */ | 75 | /* Handled by shmem itself, or for DAX we do nothing. */ |
77 | if (shmem_mapping(mapping)) | 76 | if (shmem_mapping(mapping) || dax_mapping(mapping)) |
78 | return 1; | 77 | return 1; |
79 | if (dax_mapping(mapping)) | ||
80 | return dax_invalidate_mapping_entry(mapping, index); | ||
81 | clear_shadow_entry(mapping, index, entry); | 78 | clear_shadow_entry(mapping, index, entry); |
82 | return 1; | 79 | return 1; |
83 | } | 80 | } |