summaryrefslogtreecommitdiffstats
path: root/mm/page_io.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-05-05 10:12:37 +0200
committerIngo Molnar <mingo@kernel.org>2016-05-05 10:12:37 +0200
commit1a618c2cfe4c02190d8d1f9c5052f0defc58de20 (patch)
tree170002288786f702e1d4ca638b53d1594a7caa16 /mm/page_io.c
parent03d85a63ee3e2d3a43460f936b86334b32f88c89 (diff)
parent8482716b9d865db34c55d4bf2fed19498e7195b9 (diff)
downloadblackbird-obmc-linux-1a618c2cfe4c02190d8d1f9c5052f0defc58de20.tar.gz
blackbird-obmc-linux-1a618c2cfe4c02190d8d1f9c5052f0defc58de20.zip
Merge branch 'perf/urgent' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/page_io.c')
-rw-r--r--mm/page_io.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/page_io.c b/mm/page_io.c
index cd92e3d67a32..985f23cfa79b 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -353,7 +353,11 @@ int swap_readpage(struct page *page)
ret = bdev_read_page(sis->bdev, swap_page_sector(page), page);
if (!ret) {
- swap_slot_free_notify(page);
+ if (trylock_page(page)) {
+ swap_slot_free_notify(page);
+ unlock_page(page);
+ }
+
count_vm_event(PSWPIN);
return 0;
}
OpenPOWER on IntegriCloud