projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
i40e: fix an uninitialized variable bug
[cascardo/linux.git]
/
mm
/
page_io.c
diff --git
a/mm/page_io.c
b/mm/page_io.c
index
cd92e3d
..
985f23c
100644
(file)
--- 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;
}