Commit 0002b61b authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

f2fs: return AOP_WRITEPAGE_ACTIVATE for writepage

We should use AOP_WRITEPAGE_ACTIVATE when we bypass writing pages.
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarMiao Xie <miaoxie@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 26787236
...@@ -1384,6 +1384,8 @@ static int f2fs_write_data_page(struct page *page, ...@@ -1384,6 +1384,8 @@ static int f2fs_write_data_page(struct page *page,
redirty_out: redirty_out:
redirty_page_for_writepage(wbc, page); redirty_page_for_writepage(wbc, page);
if (!err)
return AOP_WRITEPAGE_ACTIVATE;
unlock_page(page); unlock_page(page);
return err; return err;
} }
...@@ -1479,6 +1481,15 @@ static int f2fs_write_cache_pages(struct address_space *mapping, ...@@ -1479,6 +1481,15 @@ static int f2fs_write_cache_pages(struct address_space *mapping,
ret = mapping->a_ops->writepage(page, wbc); ret = mapping->a_ops->writepage(page, wbc);
if (unlikely(ret)) { if (unlikely(ret)) {
/*
* keep nr_to_write, since vfs uses this to
* get # of written pages.
*/
if (ret == AOP_WRITEPAGE_ACTIVATE) {
unlock_page(page);
ret = 0;
continue;
}
done_index = page->index + 1; done_index = page->index + 1;
done = 1; done = 1;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment