diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2015-08-27 20:02:54 +0200 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2015-09-03 20:34:14 +0200 |
commit | 8f7e0a806db0a3ba33234af3c39d68ed8c144071 (patch) | |
tree | adc4974af6e5b1ee8ee736955bfdad47a51377c9 /fs/gfs2/glock.c | |
parent | gfs2: Fix a typo in a comment (diff) | |
download | linux-8f7e0a806db0a3ba33234af3c39d68ed8c144071.tar.xz linux-8f7e0a806db0a3ba33234af3c39d68ed8c144071.zip |
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>
Diffstat (limited to 'fs/gfs2/glock.c')
-rw-r--r-- | fs/gfs2/glock.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 37d4db1ac0b2..9bd1244caf38 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -1727,7 +1727,6 @@ static int gfs2_sbstats_seq_show(struct seq_file *seq, void *iter_ptr) loff_t pos = *(loff_t *)iter_ptr; unsigned index = pos >> 3; unsigned subindex = pos & 0x07; - u64 value; int i; if (index == 0 && subindex != 0) @@ -1738,12 +1737,12 @@ static int gfs2_sbstats_seq_show(struct seq_file *seq, void *iter_ptr) for_each_possible_cpu(i) { const struct gfs2_pcpu_lkstats *lkstats = per_cpu_ptr(sdp->sd_lkstats, i); - if (index == 0) { - value = i; - } else { - value = lkstats->lkstats[index - 1].stats[subindex]; - } - seq_printf(seq, " %15llu", (long long)value); + + if (index == 0) + seq_printf(seq, " %15u", i); + else + seq_printf(seq, " %15llu", (unsigned long long)lkstats-> + lkstats[index - 1].stats[subindex]); } seq_putc(seq, '\n'); return 0; |