Skip to content

Commit 8f7e0a8

Browse files
Andreas GruenbacherAstralBob
authored andcommitted
gfs2: A minor "sbstats" cleanup
It seems cleaner to avoid the temporary value here. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
1 parent c9ea8c8 commit 8f7e0a8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

fs/gfs2/glock.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,7 +1727,6 @@ static int gfs2_sbstats_seq_show(struct seq_file *seq, void *iter_ptr)
17271727
loff_t pos = *(loff_t *)iter_ptr;
17281728
unsigned index = pos >> 3;
17291729
unsigned subindex = pos & 0x07;
1730-
u64 value;
17311730
int i;
17321731

17331732
if (index == 0 && subindex != 0)
@@ -1738,12 +1737,12 @@ static int gfs2_sbstats_seq_show(struct seq_file *seq, void *iter_ptr)
17381737

17391738
for_each_possible_cpu(i) {
17401739
const struct gfs2_pcpu_lkstats *lkstats = per_cpu_ptr(sdp->sd_lkstats, i);
1741-
if (index == 0) {
1742-
value = i;
1743-
} else {
1744-
value = lkstats->lkstats[index - 1].stats[subindex];
1745-
}
1746-
seq_printf(seq, " %15llu", (long long)value);
1740+
1741+
if (index == 0)
1742+
seq_printf(seq, " %15u", i);
1743+
else
1744+
seq_printf(seq, " %15llu", (unsigned long long)lkstats->
1745+
lkstats[index - 1].stats[subindex]);
17471746
}
17481747
seq_putc(seq, '\n');
17491748
return 0;

0 commit comments

Comments
 (0)