aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2015-08-27 14:02:54 -0400
committerBob Peterson <rpeterso@redhat.com>2015-09-03 14:34:14 -0400
commit8f7e0a806db0a3ba33234af3c39d68ed8c144071 (patch)
treeadc4974af6e5b1ee8ee736955bfdad47a51377c9
parentc9ea8c8b74b5fb2584879e4338770ed252d8a489 (diff)
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>
-rw-r--r--fs/gfs2/glock.c13
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)
1727 loff_t pos = *(loff_t *)iter_ptr; 1727 loff_t pos = *(loff_t *)iter_ptr;
1728 unsigned index = pos >> 3; 1728 unsigned index = pos >> 3;
1729 unsigned subindex = pos & 0x07; 1729 unsigned subindex = pos & 0x07;
1730 u64 value;
1731 int i; 1730 int i;
1732 1731
1733 if (index == 0 && subindex != 0) 1732 if (index == 0 && subindex != 0)
@@ -1738,12 +1737,12 @@ static int gfs2_sbstats_seq_show(struct seq_file *seq, void *iter_ptr)
1738 1737
1739 for_each_possible_cpu(i) { 1738 for_each_possible_cpu(i) {
1740 const struct gfs2_pcpu_lkstats *lkstats = per_cpu_ptr(sdp->sd_lkstats, i); 1739 const struct gfs2_pcpu_lkstats *lkstats = per_cpu_ptr(sdp->sd_lkstats, i);
1741 if (index == 0) { 1740
1742 value = i; 1741 if (index == 0)
1743 } else { 1742 seq_printf(seq, " %15u", i);
1744 value = lkstats->lkstats[index - 1].stats[subindex]; 1743 else
1745 } 1744 seq_printf(seq, " %15llu", (unsigned long long)lkstats->
1746 seq_printf(seq, " %15llu", (long long)value); 1745 lkstats[index - 1].stats[subindex]);
1747 } 1746 }
1748 seq_putc(seq, '\n'); 1747 seq_putc(seq, '\n');
1749 return 0; 1748 return 0;