diff options
| author | Chao Yu <yuchao0@huawei.com> | 2017-02-27 17:10:45 +0800 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-13 12:35:04 +0200 |
| commit | 5cbcc2b7e76eb5ba8dfbe0dae0ec22da6f40bbf5 (patch) | |
| tree | 54b000b801ad09565f99f8f7ff449aba36880377 /fs/f2fs | |
| parent | c69d697ce17fee60d06dd0a5d56694c8463b7d4c (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/f2fs')
| -rw-r--r-- | fs/f2fs/data.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c index 09efaa25c..cf9f80ac9 100644 --- a/fs/f2fs/data.c +++ b/fs/f2fs/data.c @@ -399,7 +399,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, |
