summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2019-02-21 13:40:13 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2019-03-13 02:59:18 +0100
commite46f6bd82c831d20f9b6c149076cf5d2c443d638 (patch)
treef2a1822b84da0717d0822cc281b3859c3183cb26
parentf2fs: fix encrypted page memory leak (diff)
downloadlinux-e46f6bd82c831d20f9b6c149076cf5d2c443d638.tar.xz
linux-e46f6bd82c831d20f9b6c149076cf5d2c443d638.zip
f2fs: fix to update iostat correctly in IPU path
In error path of IPU, we didn't account iostat correctly, fix it. Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/segment.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 2537893e9466..d74359325da6 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -3182,10 +3182,10 @@ int f2fs_inplace_write_data(struct f2fs_io_info *fio)
stat_inc_inplace_blocks(fio->sbi);
err = f2fs_submit_page_bio(fio);
- if (!err)
+ if (!err) {
update_device_state(fio);
-
- f2fs_update_iostat(fio->sbi, fio->io_type, F2FS_BLKSIZE);
+ f2fs_update_iostat(fio->sbi, fio->io_type, F2FS_BLKSIZE);
+ }
return err;
}