diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-09 09:39:13 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-05-09 09:39:13 +0200 |
| commit | 10ee08292028d3d22d201a34ba7d24a085818cb3 (patch) | |
| tree | cf3bff48a7eab154574355f00a4b4f27dc85ff11 /mm/page_io.c | |
| parent | 7da4b8b7378790dd1e4af1bb7522863127fa1438 (diff) | |
| parent | 44549e8f5eea4e0a41b487b63e616cb089922b99 (diff) | |
Merge 4.6-rc7 into tty-next
We want the pty fixes in here as well so that patches can build on it.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/page_io.c')
| -rw-r--r-- | mm/page_io.c | 6 |
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; } |
