ffs_inode.c (76132) | ffs_inode.c (76357) |
---|---|
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.13 (Berkeley) 4/21/95 | 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.13 (Berkeley) 4/21/95 |
34 * $FreeBSD: head/sys/ufs/ffs/ffs_inode.c 76132 2001-04-29 12:36:52Z phk $ | 34 * $FreeBSD: head/sys/ufs/ffs/ffs_inode.c 76357 2001-05-08 07:42:20Z mckusick $ |
35 */ 36 37#include "opt_quota.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/mount.h> 42#include <sys/proc.h> --- 145 unchanged lines hidden (view full) --- 188 * point. Finding and deallocating those structures 189 * is a lot of work. Since partial truncation occurs 190 * rarely, we solve the problem by syncing the file 191 * so that it will have no data structures left. 192 */ 193 if ((error = VOP_FSYNC(ovp, cred, MNT_WAIT, 194 p)) != 0) 195 return (error); | 35 */ 36 37#include "opt_quota.h" 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/mount.h> 42#include <sys/proc.h> --- 145 unchanged lines hidden (view full) --- 188 * point. Finding and deallocating those structures 189 * is a lot of work. Since partial truncation occurs 190 * rarely, we solve the problem by syncing the file 191 * so that it will have no data structures left. 192 */ 193 if ((error = VOP_FSYNC(ovp, cred, MNT_WAIT, 194 p)) != 0) 195 return (error); |
196 if (oip->i_flag & IN_SPACECOUNTED) 197 fs->fs_pendingblocks -= oip->i_blocks; |
|
196 } else { 197#ifdef QUOTA 198 (void) chkdq(oip, -oip->i_blocks, NOCRED, 0); 199#endif 200 softdep_setup_freeblocks(oip, length); 201 vinvalbuf(ovp, 0, cred, p, 0, 0); 202 oip->i_flag |= IN_CHANGE | IN_UPDATE; 203 return (ffs_update(ovp, 0)); --- 325 unchanged lines hidden --- | 198 } else { 199#ifdef QUOTA 200 (void) chkdq(oip, -oip->i_blocks, NOCRED, 0); 201#endif 202 softdep_setup_freeblocks(oip, length); 203 vinvalbuf(ovp, 0, cred, p, 0, 0); 204 oip->i_flag |= IN_CHANGE | IN_UPDATE; 205 return (ffs_update(ovp, 0)); --- 325 unchanged lines hidden --- |