Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern buf_inorder: deal with 64-bit daddr_t correctly.
details: https://anonhg.NetBSD.org/src/rev/5aae44cade4f
branches: trunk
changeset: 555976:5aae44cade4f
user: yamt <yamt%NetBSD.org@localhost>
date: Fri Dec 05 10:16:16 2003 +0000
description:
buf_inorder: deal with 64-bit daddr_t correctly.
diffstat:
sys/kern/subr_disk.c | 17 ++++++-----------
1 files changed, 6 insertions(+), 11 deletions(-)
diffs (43 lines):
diff -r 404a1ae8e86c -r 5aae44cade4f sys/kern/subr_disk.c
--- a/sys/kern/subr_disk.c Fri Dec 05 06:56:19 2003 +0000
+++ b/sys/kern/subr_disk.c Fri Dec 05 10:16:16 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: subr_disk.c,v 1.54 2003/12/04 19:38:23 atatat Exp $ */
+/* $NetBSD: subr_disk.c,v 1.55 2003/12/05 10:16:16 yamt Exp $ */
/*-
* Copyright (c) 1996, 1997, 1999, 2000 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.54 2003/12/04 19:38:23 atatat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_disk.c,v 1.55 2003/12/05 10:16:16 yamt Exp $");
#include "opt_compat_netbsd.h"
@@ -492,20 +492,15 @@
static __inline int
buf_inorder(struct buf *bp, struct buf *bq, int sortby)
{
- int r;
if (bp == NULL || bq == NULL)
return (bq == NULL);
- if (sortby == BUFQ_SORT_CYLINDER)
- r = bp->b_cylinder - bq->b_cylinder;
- else
- r = 0;
+ if (sortby == BUFQ_SORT_CYLINDER && bp->b_cylinder < bq->b_cylinder)
+ return 1;
- if (r == 0)
- r = bp->b_rawblkno - bq->b_rawblkno;
-
- return (r <= 0);
+ if (bp->b_rawblkno < bq->b_rawblkno)
+ return 1;
}
Home |
Main Index |
Thread Index |
Old Index