diff options
author | Chao Yu <yuchao0@huawei.com> | 2016-11-29 06:13:43 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-11-30 02:43:00 +0300 |
commit | 0002b61bdaac732bcff364a18f5bd57c95def0a5 (patch) | |
tree | 5fb79ef6290e709bd82f6df3767df16be862b10a /fs/f2fs | |
parent | 26787236b36660baf4d136281d40b5bb33a570ec (diff) | |
download | linux-0002b61bdaac732bcff364a18f5bd57c95def0a5.tar.xz |
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>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/data.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 8c5b63bda68b..b90fb010a991 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -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; |