summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-02-27 17:10:45 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-03-08 22:02:46 -0800
commit6ac7367ebfee241a3df925859e6dd55dd89da2fc (patch)
tree3b881b4ceaac647c667b7d55ebc43c8b3b86bf67 /fs
parentb1305bba60c0a2bf2aeb2c16777f2fbe0d46f282 (diff)
f2fs: fix to update F2FS_{CP_}WB_DATA count correctly
We should only account F2FS_{CP_}WB_DATA IOs for write path, fix it. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/data.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index dacc9b2896d7..58e7dcb9af62 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -398,7 +398,8 @@ alloc_new:
if ((fio->type == DATA || fio->type == NODE) &&
fio->new_blkaddr & F2FS_IO_SIZE_MASK(sbi)) {
err = -EAGAIN;
- dec_page_count(sbi, WB_DATA_TYPE(bio_page));
+ if (!is_read)
+ dec_page_count(sbi, WB_DATA_TYPE(bio_page));
goto out_fail;
}
io->bio = __bio_alloc(sbi, fio->new_blkaddr,