Re: [PATCH]: jiffies wrap in ll_rw_blk.c

From: Benjamin LaHaise (bcrl@redhat.com)
Date: Wed Nov 20 2002 - 16:06:59 EST


Erm, you just truncated a long to an int.

                -ben

On Wed, Nov 20, 2002 at 03:44:03PM -0500, Luben Tuikov wrote:
> --- ll_rw_blk.c.old Wed Nov 20 15:32:50 2002
> +++ ll_rw_blk.c Wed Nov 20 15:33:06 2002
> @@ -2092,7 +2092,7 @@
> complete(req->waiting);
>
> if (disk) {
> - unsigned long duration = jiffies - req->start_time;
> + unsigned long duration = (signed) jiffies - (signed) req->start_time;
> switch (rq_data_dir(req)) {
> case WRITE:
> disk->writes++;
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

-- 
"Do you seek knowledge in time travel?"
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Nov 23 2002 - 22:00:33 EST