ffs_balloc.c (8876) | ffs_balloc.c (13490) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ffs_balloc.c 8.4 (Berkeley) 9/23/93 | 1/* 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)ffs_balloc.c 8.4 (Berkeley) 9/23/93 |
34 * $Id: ffs_balloc.c,v 1.8 1995/05/28 04:32:23 davidg Exp $ | 34 * $Id: ffs_balloc.c,v 1.9 1995/05/30 08:14:59 rgrimes Exp $ |
35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/buf.h> 40#include <sys/proc.h> 41#include <sys/file.h> 42#include <sys/vnode.h> --- 162 unchanged lines hidden (view full) --- 205 return (error); 206 } 207 bap = (daddr_t *)bp->b_data; 208 nb = bap[indirs[i].in_off]; 209 if (i == num) 210 break; 211 i += 1; 212 if (nb != 0) { | 35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/buf.h> 40#include <sys/proc.h> 41#include <sys/file.h> 42#include <sys/vnode.h> --- 162 unchanged lines hidden (view full) --- 205 return (error); 206 } 207 bap = (daddr_t *)bp->b_data; 208 nb = bap[indirs[i].in_off]; 209 if (i == num) 210 break; 211 i += 1; 212 if (nb != 0) { |
213 brelse(bp); | 213 bqrelse(bp); |
214 continue; 215 } 216 if (pref == 0) 217 pref = ffs_blkpref(ip, lbn, 0, (daddr_t *)0); 218 error = 219 ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, cred, &newb); 220 if (error) { 221 brelse(bp); --- 70 unchanged lines hidden --- | 214 continue; 215 } 216 if (pref == 0) 217 pref = ffs_blkpref(ip, lbn, 0, (daddr_t *)0); 218 error = 219 ffs_alloc(ip, lbn, pref, (int)fs->fs_bsize, cred, &newb); 220 if (error) { 221 brelse(bp); --- 70 unchanged lines hidden --- |