summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2019-06-18 18:00:09 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2019-07-02 15:40:40 -0700
commit8740edc3e5cca78e20ac3ba0127f61ab7cdb4d2f (patch)
treeca607272bc27bbe1e9012dacb3e28addbe92066d /fs
parent04f0b2eaa3b3ee243df6040617b4bfbbc0404854 (diff)
downloadlinux-8740edc3e5cca78e20ac3ba0127f61ab7cdb4d2f.tar.bz2
f2fs: avoid get_valid_blocks() for cleanup
No logic change. 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/sysfs.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index cb8308860b69..3aeacd0aacfd 100644
--- a/fs/f2fs/sysfs.c
+++ b/fs/f2fs/sysfs.c
@@ -584,8 +584,7 @@ static int __maybe_unused segment_info_seq_show(struct seq_file *seq,
if ((i % 10) == 0)
seq_printf(seq, "%-10d", i);
- seq_printf(seq, "%d|%-3u", se->type,
- get_valid_blocks(sbi, i, false));
+ seq_printf(seq, "%d|%-3u", se->type, se->valid_blocks);
if ((i % 10) == 9 || i == (total_segs - 1))
seq_putc(seq, '\n');
else
@@ -611,8 +610,7 @@ static int __maybe_unused segment_bits_seq_show(struct seq_file *seq,
struct seg_entry *se = get_seg_entry(sbi, i);
seq_printf(seq, "%-10d", i);
- seq_printf(seq, "%d|%-3u|", se->type,
- get_valid_blocks(sbi, i, false));
+ seq_printf(seq, "%d|%-3u|", se->type, se->valid_blocks);
for (j = 0; j < SIT_VBLOCK_MAP_SIZE; j++)
seq_printf(seq, " %.2x", se->cur_valid_map[j]);
seq_putc(seq, '\n');