X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fblock%2Fgenhd.c;h=c68215b35252c546775370b30d42ac978cca28e3;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=e82caa224d1fa80846b82f2d2d5f001e6e0ef4d2;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/drivers/block/genhd.c b/drivers/block/genhd.c index e82caa224..c68215b35 100644 --- a/drivers/block/genhd.c +++ b/drivers/block/genhd.c @@ -365,7 +365,9 @@ static ssize_t disk_size_read(struct gendisk * disk, char *page) static ssize_t disk_stats_read(struct gendisk * disk, char *page) { + preempt_disable(); disk_round_stats(disk); + preempt_enable(); return sprintf(page, "%8u %8u %8llu %8u " "%8u %8u %8llu %8u " @@ -494,7 +496,9 @@ static int diskstats_show(struct seq_file *s, void *v) "\n\n"); */ + preempt_disable(); disk_round_stats(gp); + preempt_enable(); seq_printf(s, "%4d %4d %s %u %u %llu %u %u %u %llu %u %u %u %u\n", gp->major, n + gp->first_minor, disk_name(gp, n, buf), disk_stat_read(gp, reads), disk_stat_read(gp, read_merges),