diff options
author | Hugh Dickins <hugh@veritas.com> | 2008-11-19 15:36:36 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-11-19 18:49:58 -0800 |
commit | bda8550deed96687f29992d711a88ea21cff4d26 (patch) | |
tree | 41061a3259d2ed2e19ed4b9e53e41675eb60bd3f /mm | |
parent | 966c8c12dc9e77f931e2281ba25d2f0244b06949 (diff) | |
download | linux-stable-bda8550deed96687f29992d711a88ea21cff4d26.tar.gz linux-stable-bda8550deed96687f29992d711a88ea21cff4d26.tar.bz2 linux-stable-bda8550deed96687f29992d711a88ea21cff4d26.zip |
migration: fix writepage error
Page migration's writeout() has got understandably confused by the nasty
AOP_WRITEPAGE_ACTIVATE case: as in normal success, a writepage() error has
unlocked the page, so writeout() then needs to relock it.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/migrate.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index 385db89f0c33..1e0d6b237f44 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -522,15 +522,12 @@ static int writeout(struct address_space *mapping, struct page *page) remove_migration_ptes(page, page); rc = mapping->a_ops->writepage(page, &wbc); - if (rc < 0) - /* I/O Error writing */ - return -EIO; if (rc != AOP_WRITEPAGE_ACTIVATE) /* unlocked. Relock */ lock_page(page); - return -EAGAIN; + return (rc < 0) ? -EIO : -EAGAIN; } /* |