ffs_inode.c (6875) | ffs_inode.c (7399) |
---|---|
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_inode.c 8.5 (Berkeley) 12/30/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_inode.c 8.5 (Berkeley) 12/30/93 |
34 * $Id: ffs_inode.c,v 1.11 1995/01/09 16:05:18 davidg Exp $ | 34 * $Id: ffs_inode.c,v 1.12 1995/03/04 03:24:42 davidg Exp $ |
35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/mount.h> 40#include <sys/proc.h> 41#include <sys/file.h> 42#include <sys/buf.h> --- 201 unchanged lines hidden (view full) --- 244 if (ap->a_flags & IO_SYNC) 245 aflags |= B_SYNC; 246 error = ffs_balloc(oip, lbn, offset, ap->a_cred, &bp, aflags); 247 if (error) 248 return (error); 249 oip->i_size = length; 250 size = blksize(fs, oip, lbn); 251 bzero((char *)bp->b_data + offset, (u_int)(size - offset)); | 35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/mount.h> 40#include <sys/proc.h> 41#include <sys/file.h> 42#include <sys/buf.h> --- 201 unchanged lines hidden (view full) --- 244 if (ap->a_flags & IO_SYNC) 245 aflags |= B_SYNC; 246 error = ffs_balloc(oip, lbn, offset, ap->a_cred, &bp, aflags); 247 if (error) 248 return (error); 249 oip->i_size = length; 250 size = blksize(fs, oip, lbn); 251 bzero((char *)bp->b_data + offset, (u_int)(size - offset)); |
252 allocbuf(bp, size, 0); | 252 allocbuf(bp, size); |
253 if (aflags & IO_SYNC) 254 bwrite(bp); 255 else 256 bawrite(bp); 257 } 258 /* 259 * Calculate index into inode's block list of 260 * last direct and indirect blocks (if any) --- 248 unchanged lines hidden --- | 253 if (aflags & IO_SYNC) 254 bwrite(bp); 255 else 256 bawrite(bp); 257 } 258 /* 259 * Calculate index into inode's block list of 260 * last direct and indirect blocks (if any) --- 248 unchanged lines hidden --- |