1
0
Fork 0

f2fs: return AOP_WRITEPAGE_ACTIVATE for writepage

We should use AOP_WRITEPAGE_ACTIVATE when we bypass writing pages.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Miao Xie <miaoxie@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
zero-colors
Chao Yu 2016-11-28 19:13:43 -08:00 committed by Jaegeuk Kim
parent 26787236b3
commit 0002b61bda
1 changed files with 11 additions and 0 deletions

View File

@ -1384,6 +1384,8 @@ out:
redirty_out:
redirty_page_for_writepage(wbc, page);
if (!err)
return AOP_WRITEPAGE_ACTIVATE;
unlock_page(page);
return err;
}
@ -1479,6 +1481,15 @@ continue_unlock:
ret = mapping->a_ops->writepage(page, wbc);
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 = 1;
break;