提交 8f7e0a80 编写于 作者: A Andreas Gruenbacher 提交者: Bob Peterson

gfs2: A minor "sbstats" cleanup

It seems cleaner to avoid the temporary value here.
Signed-off-by: NAndreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: NBob Peterson <rpeterso@redhat.com>
上级 c9ea8c8b
...@@ -1727,7 +1727,6 @@ static int gfs2_sbstats_seq_show(struct seq_file *seq, void *iter_ptr) ...@@ -1727,7 +1727,6 @@ static int gfs2_sbstats_seq_show(struct seq_file *seq, void *iter_ptr)
loff_t pos = *(loff_t *)iter_ptr; loff_t pos = *(loff_t *)iter_ptr;
unsigned index = pos >> 3; unsigned index = pos >> 3;
unsigned subindex = pos & 0x07; unsigned subindex = pos & 0x07;
u64 value;
int i; int i;
if (index == 0 && subindex != 0) if (index == 0 && subindex != 0)
...@@ -1738,12 +1737,12 @@ static int gfs2_sbstats_seq_show(struct seq_file *seq, void *iter_ptr) ...@@ -1738,12 +1737,12 @@ static int gfs2_sbstats_seq_show(struct seq_file *seq, void *iter_ptr)
for_each_possible_cpu(i) { for_each_possible_cpu(i) {
const struct gfs2_pcpu_lkstats *lkstats = per_cpu_ptr(sdp->sd_lkstats, i); const struct gfs2_pcpu_lkstats *lkstats = per_cpu_ptr(sdp->sd_lkstats, i);
if (index == 0) {
value = i; if (index == 0)
} else { seq_printf(seq, " %15u", i);
value = lkstats->lkstats[index - 1].stats[subindex]; else
} seq_printf(seq, " %15llu", (unsigned long long)lkstats->
seq_printf(seq, " %15llu", (long long)value); lkstats[index - 1].stats[subindex]);
} }
seq_putc(seq, '\n'); seq_putc(seq, '\n');
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册