diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-23 23:44:19 -0500 |
commit | 1ebbe2b20091d306453a5cf480a87e6cd28ae76f (patch) | |
tree | f5cd7a0fa69b8b1938cb5a0faed2e7b0628072a5 /include/linux/genhd.h | |
parent | ac58c9059da8886b5e8cde012a80266b18ca146e (diff) | |
parent | 674a396c6d2ba0341ebdd7c1c9950f32f018e2dd (diff) |
Merge branch 'linus'
Diffstat (limited to 'include/linux/genhd.h')
-rw-r--r-- | include/linux/genhd.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index eef5ccdcd731..fd647fde5ec1 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -149,22 +149,16 @@ struct disk_attribute { | |||
149 | ({ \ | 149 | ({ \ |
150 | typeof(gendiskp->dkstats->field) res = 0; \ | 150 | typeof(gendiskp->dkstats->field) res = 0; \ |
151 | int i; \ | 151 | int i; \ |
152 | for (i=0; i < NR_CPUS; i++) { \ | 152 | for_each_cpu(i) \ |
153 | if (!cpu_possible(i)) \ | ||
154 | continue; \ | ||
155 | res += per_cpu_ptr(gendiskp->dkstats, i)->field; \ | 153 | res += per_cpu_ptr(gendiskp->dkstats, i)->field; \ |
156 | } \ | ||
157 | res; \ | 154 | res; \ |
158 | }) | 155 | }) |
159 | 156 | ||
160 | static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { | 157 | static inline void disk_stat_set_all(struct gendisk *gendiskp, int value) { |
161 | int i; | 158 | int i; |
162 | for (i=0; i < NR_CPUS; i++) { | 159 | for_each_cpu(i) |
163 | if (cpu_possible(i)) { | 160 | memset(per_cpu_ptr(gendiskp->dkstats, i), value, |
164 | memset(per_cpu_ptr(gendiskp->dkstats, i), value, | 161 | sizeof (struct disk_stats)); |
165 | sizeof (struct disk_stats)); | ||
166 | } | ||
167 | } | ||
168 | } | 162 | } |
169 | 163 | ||
170 | #else | 164 | #else |