diff options
Diffstat (limited to 'include/linux/swapops.h')
-rw-r--r-- | include/linux/swapops.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/linux/swapops.h b/include/linux/swapops.h index 6adfb7bfbf44..cedf3d3c373f 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h | |||
@@ -54,7 +54,7 @@ static inline pgoff_t swp_offset(swp_entry_t entry) | |||
54 | /* check whether a pte points to a swap entry */ | 54 | /* check whether a pte points to a swap entry */ |
55 | static inline int is_swap_pte(pte_t pte) | 55 | static inline int is_swap_pte(pte_t pte) |
56 | { | 56 | { |
57 | return !pte_none(pte) && !pte_present_nonuma(pte) && !pte_file(pte); | 57 | return !pte_none(pte) && !pte_present(pte); |
58 | } | 58 | } |
59 | #endif | 59 | #endif |
60 | 60 | ||
@@ -66,7 +66,6 @@ static inline swp_entry_t pte_to_swp_entry(pte_t pte) | |||
66 | { | 66 | { |
67 | swp_entry_t arch_entry; | 67 | swp_entry_t arch_entry; |
68 | 68 | ||
69 | BUG_ON(pte_file(pte)); | ||
70 | if (pte_swp_soft_dirty(pte)) | 69 | if (pte_swp_soft_dirty(pte)) |
71 | pte = pte_swp_clear_soft_dirty(pte); | 70 | pte = pte_swp_clear_soft_dirty(pte); |
72 | arch_entry = __pte_to_swp_entry(pte); | 71 | arch_entry = __pte_to_swp_entry(pte); |
@@ -82,7 +81,6 @@ static inline pte_t swp_entry_to_pte(swp_entry_t entry) | |||
82 | swp_entry_t arch_entry; | 81 | swp_entry_t arch_entry; |
83 | 82 | ||
84 | arch_entry = __swp_entry(swp_type(entry), swp_offset(entry)); | 83 | arch_entry = __swp_entry(swp_type(entry), swp_offset(entry)); |
85 | BUG_ON(pte_file(__swp_entry_to_pte(arch_entry))); | ||
86 | return __swp_entry_to_pte(arch_entry); | 84 | return __swp_entry_to_pte(arch_entry); |
87 | } | 85 | } |
88 | 86 | ||
@@ -137,6 +135,8 @@ static inline void make_migration_entry_read(swp_entry_t *entry) | |||
137 | *entry = swp_entry(SWP_MIGRATION_READ, swp_offset(*entry)); | 135 | *entry = swp_entry(SWP_MIGRATION_READ, swp_offset(*entry)); |
138 | } | 136 | } |
139 | 137 | ||
138 | extern void __migration_entry_wait(struct mm_struct *mm, pte_t *ptep, | ||
139 | spinlock_t *ptl); | ||
140 | extern void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, | 140 | extern void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, |
141 | unsigned long address); | 141 | unsigned long address); |
142 | extern void migration_entry_wait_huge(struct vm_area_struct *vma, | 142 | extern void migration_entry_wait_huge(struct vm_area_struct *vma, |
@@ -150,6 +150,8 @@ static inline int is_migration_entry(swp_entry_t swp) | |||
150 | } | 150 | } |
151 | #define migration_entry_to_page(swp) NULL | 151 | #define migration_entry_to_page(swp) NULL |
152 | static inline void make_migration_entry_read(swp_entry_t *entryp) { } | 152 | static inline void make_migration_entry_read(swp_entry_t *entryp) { } |
153 | static inline void __migration_entry_wait(struct mm_struct *mm, pte_t *ptep, | ||
154 | spinlock_t *ptl) { } | ||
153 | static inline void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, | 155 | static inline void migration_entry_wait(struct mm_struct *mm, pmd_t *pmd, |
154 | unsigned long address) { } | 156 | unsigned long address) { } |
155 | static inline void migration_entry_wait_huge(struct vm_area_struct *vma, | 157 | static inline void migration_entry_wait_huge(struct vm_area_struct *vma, |