]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] as-iosched tunable encoding fix
authorJens Axboe <axboe@suse.de>
Wed, 27 Jul 2005 18:43:37 +0000 (11:43 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 27 Jul 2005 23:25:50 +0000 (16:25 -0700)
AS is doing internal msec<->jiffies conversions twice, so the sysfs tunables
which represent time are coming out wrong.  The switch from HZ=1000 exposed
this.

Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/block/as-iosched.c

index 91aeb678135dbe84798ca1b2f5fcfe2f6b0ebf2b..95c0a3690b0ffc15618acb6dfcae29f81234d846 100644 (file)
@@ -1935,23 +1935,15 @@ struct as_fs_entry {
 static ssize_t
 as_var_show(unsigned int var, char *page)
 {
-       var = (var * 1000) / HZ;
        return sprintf(page, "%d\n", var);
 }
 
 static ssize_t
 as_var_store(unsigned long *var, const char *page, size_t count)
 {
-       unsigned long tmp;
        char *p = (char *) page;
 
-       tmp = simple_strtoul(p, &p, 10);
-       if (tmp != 0) {
-               tmp = (tmp * HZ) / 1000;
-               if (tmp == 0)
-                       tmp = 1;
-       }
-       *var = tmp;
+       *var = simple_strtoul(p, &p, 10);
        return count;
 }