cd9660_node.c (42248) | cd9660_node.c (43301) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1989, 1994, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley 6 * by Pace Willisson (pace@blitz.com). The Rock Ridge Extension 7 * Support code is derived from software contributed to Berkeley 8 * by Atsushi Murai (amurai@spec.co.jp). --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94 | 1/*- 2 * Copyright (c) 1982, 1986, 1989, 1994, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley 6 * by Pace Willisson (pace@blitz.com). The Rock Ridge Extension 7 * Support code is derived from software contributed to Berkeley 8 * by Atsushi Murai (amurai@spec.co.jp). --- 22 unchanged lines hidden (view full) --- 31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 36 * SUCH DAMAGE. 37 * 38 * @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94 |
39 * $Id: cd9660_node.c,v 1.25 1998/02/09 06:09:18 eivind Exp $ | 39 * $Id: cd9660_node.c,v 1.26 1999/01/02 11:34:54 bde Exp $ |
40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/mount.h> 45#include <sys/proc.h> 46#include <sys/buf.h> 47#include <sys/vnode.h> --- 67 unchanged lines hidden (view full) --- 115cd9660_ihashins(ip) 116 struct iso_node *ip; 117{ 118 struct proc *p = curproc; /* XXX */ 119 struct iso_node **ipp, *iq; 120 121 simple_lock(&cd9660_ihash_slock); 122 ipp = &isohashtbl[INOHASH(ip->i_dev, ip->i_number)]; | 40 */ 41 42#include <sys/param.h> 43#include <sys/systm.h> 44#include <sys/mount.h> 45#include <sys/proc.h> 46#include <sys/buf.h> 47#include <sys/vnode.h> --- 67 unchanged lines hidden (view full) --- 115cd9660_ihashins(ip) 116 struct iso_node *ip; 117{ 118 struct proc *p = curproc; /* XXX */ 119 struct iso_node **ipp, *iq; 120 121 simple_lock(&cd9660_ihash_slock); 122 ipp = &isohashtbl[INOHASH(ip->i_dev, ip->i_number)]; |
123 if (iq = *ipp) | 123 if ((iq = *ipp) != NULL) |
124 iq->i_prev = &ip->i_next; 125 ip->i_next = iq; 126 ip->i_prev = ipp; 127 *ipp = ip; 128 simple_unlock(&cd9660_ihash_slock); 129 130 lockmgr(&ip->i_lock, LK_EXCLUSIVE, (struct simplelock *)0, p); 131} 132 133/* 134 * Remove the inode from the hash table. 135 */ 136static void 137cd9660_ihashrem(ip) 138 register struct iso_node *ip; 139{ 140 register struct iso_node *iq; 141 142 simple_lock(&cd9660_ihash_slock); | 124 iq->i_prev = &ip->i_next; 125 ip->i_next = iq; 126 ip->i_prev = ipp; 127 *ipp = ip; 128 simple_unlock(&cd9660_ihash_slock); 129 130 lockmgr(&ip->i_lock, LK_EXCLUSIVE, (struct simplelock *)0, p); 131} 132 133/* 134 * Remove the inode from the hash table. 135 */ 136static void 137cd9660_ihashrem(ip) 138 register struct iso_node *ip; 139{ 140 register struct iso_node *iq; 141 142 simple_lock(&cd9660_ihash_slock); |
143 if (iq = ip->i_next) | 143 if ((iq = ip->i_next) != NULL) |
144 iq->i_prev = ip->i_prev; 145 *ip->i_prev = iq; 146#ifdef DIAGNOSTIC 147 ip->i_next = NULL; 148 ip->i_prev = NULL; 149#endif 150 simple_unlock(&cd9660_ihash_slock); 151} --- 277 unchanged lines hidden --- | 144 iq->i_prev = ip->i_prev; 145 *ip->i_prev = iq; 146#ifdef DIAGNOSTIC 147 ip->i_next = NULL; 148 ip->i_prev = NULL; 149#endif 150 simple_unlock(&cd9660_ihash_slock); 151} --- 277 unchanged lines hidden --- |