diff options
author | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> | 2018-04-05 19:23:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-06 00:36:25 -0400 |
commit | 03f5d58fa42fb337b921e57f8e2c2d4df7df890d (patch) | |
tree | 57b248af904e4492b071446ae4b27f19df05c3d5 | |
parent | e92bb4dd9673945179b1fc738c9817dd91bfb629 (diff) |
mm/page_ref: use atomic_set_release in page_ref_unfreeze
page_ref_unfreeze() has exactly that semantic. No functional changes:
just minus one barrier and proper handling of PPro errata.
Link: http://lkml.kernel.org/r/151844393004.210639.4672319312617954272.stgit@buzz
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | include/linux/page_ref.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/page_ref.h b/include/linux/page_ref.h index 760d74a0e9a9..14d14beb1f7f 100644 --- a/include/linux/page_ref.h +++ b/include/linux/page_ref.h | |||
@@ -175,8 +175,7 @@ static inline void page_ref_unfreeze(struct page *page, int count) | |||
175 | VM_BUG_ON_PAGE(page_count(page) != 0, page); | 175 | VM_BUG_ON_PAGE(page_count(page) != 0, page); |
176 | VM_BUG_ON(count == 0); | 176 | VM_BUG_ON(count == 0); |
177 | 177 | ||
178 | smp_mb(); | 178 | atomic_set_release(&page->_refcount, count); |
179 | atomic_set(&page->_refcount, count); | ||
180 | if (page_ref_tracepoint_active(__tracepoint_page_ref_unfreeze)) | 179 | if (page_ref_tracepoint_active(__tracepoint_page_ref_unfreeze)) |
181 | __page_ref_unfreeze(page, count); | 180 | __page_ref_unfreeze(page, count); |
182 | } | 181 | } |