From 53fdfa80213a63bcd54076ada6be8a570bce87be Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 14 Dec 1995 04:25:00 +0000 Subject: [PATCH] from netbsd: "goto start" after sleeping for locked iso_node in cd9660_lock, like in ufs_lock. NBPG may not be computable by the preprocessor. Make "do clustered io" a run-time decision. Note: the compiler can optimize it away. --- sys/isofs/cd9660/cd9660_vnops.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index ab530dafacb..73297218f70 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -1,4 +1,4 @@ -/* $NetBSD: cd9660_vnops.c,v 1.24 1995/07/24 21:19:27 cgd Exp $ */ +/* $NetBSD: cd9660_vnops.c,v 1.26 1995/12/01 00:47:33 pk Exp $ */ /*- * Copyright (c) 1994 @@ -233,16 +233,15 @@ cd9660_getattr(ap) return (0); } -#if ISO_DEFAULT_BLOCK_SIZE >= NBPG #ifdef DEBUG extern int doclusterread; #else #define doclusterread 1 #endif -#else + /* XXX until cluster routines can handle block sizes less than one page */ -#define doclusterread 0 -#endif +#define cd9660_doclusterread \ + (doclusterread && (ISO_DEFAULT_BLOCK_SIZE >= NBPG)) /* * Vnode op for reading. @@ -284,7 +283,7 @@ cd9660_read(ap) n = diff; size = blksize(imp, ip, lbn); rablock = lbn + 1; - if (doclusterread) { + if (cd9660_doclusterread) { if (lblktosize(imp, rablock) <= ip->i_size) error = cluster_read(vp, (off_t)ip->i_size, lbn, size, NOCRED, &bp); @@ -792,6 +791,7 @@ start: ip->i_lockwaiter = -1; #endif (void) sleep((caddr_t)ip, PINOD); + goto start; } #ifdef DIAGNOSTIC ip->i_lockwaiter = 0; -- 2.20.1