tree a91d0f452ccfe72fb2cb4c2db75cddc36a2ef21d
parent ef2a701d444a4ea9790146e92756b0dde5070a15
author Jens Axboe <[EMAIL PROTECTED]> Thu, 28 Jul 2005 01:43:37 -0700
committer Linus Torvalds <[EMAIL PROTECTED]> Thu, 28 Jul 2005 06:25:50 -0700

[PATCH] as-iosched tunable encoding fix

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 <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>

 drivers/block/as-iosched.c |   10 +---------
 1 files changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/block/as-iosched.c b/drivers/block/as-iosched.c
--- a/drivers/block/as-iosched.c
+++ b/drivers/block/as-iosched.c
@@ -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;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to