Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 35599
b: refs/heads/master
c: 6ddab3b
h: refs/heads/master
i:
  35597: 7141821
  35595: 3edfe31
  35591: 28e83b3
  35583: f5b7725
v: v3
  • Loading branch information
Peter Zijlstra authored and Linus Torvalds committed Sep 26, 2006
1 parent aa2f0a8 commit 323bfcc
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ca5f9703dffa012cc46166e6206c5a992910e041
refs/heads/master: 6ddab3b9ebebc88bfdd8107c64f12d7e4480c559
21 changes: 20 additions & 1 deletion trunk/mm/page_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,23 @@ static int end_swap_bio_write(struct bio *bio, unsigned int bytes_done, int err)
if (bio->bi_size)
return 1;

if (!uptodate)
if (!uptodate) {
SetPageError(page);
/*
* We failed to write the page out to swap-space.
* Re-dirty the page in order to avoid it being reclaimed.
* Also print a dire warning that things will go BAD (tm)
* very quickly.
*
* Also clear PG_reclaim to avoid rotate_reclaimable_page()
*/
set_page_dirty(page);
printk(KERN_ALERT "Write-error on swap-device (%u:%u:%Lu)\n",
imajor(bio->bi_bdev->bd_inode),
iminor(bio->bi_bdev->bd_inode),
(unsigned long long)bio->bi_sector);
ClearPageReclaim(page);
}
end_page_writeback(page);
bio_put(bio);
return 0;
Expand All @@ -70,6 +85,10 @@ static int end_swap_bio_read(struct bio *bio, unsigned int bytes_done, int err)
if (!uptodate) {
SetPageError(page);
ClearPageUptodate(page);
printk(KERN_ALERT "Read-error on swap-device (%u:%u:%Lu)\n",
imajor(bio->bi_bdev->bd_inode),
iminor(bio->bi_bdev->bd_inode),
(unsigned long long)bio->bi_sector);
} else {
SetPageUptodate(page);
}
Expand Down

0 comments on commit 323bfcc

Please sign in to comment.