ffs_vfsops.c (3425) | ffs_vfsops.c (3487) |
---|---|
1/* 2 * Copyright (c) 1989, 1991, 1993, 1994 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_vfsops.c 8.8 (Berkeley) 4/18/94 | 1/* 2 * Copyright (c) 1989, 1991, 1993, 1994 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_vfsops.c 8.8 (Berkeley) 4/18/94 |
34 * $Id: ffs_vfsops.c,v 1.7 1994/09/22 01:57:27 wollman Exp $ | 34 * $Id: ffs_vfsops.c,v 1.8 1994/10/08 06:20:06 phk Exp $ |
35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/namei.h> 40#include <sys/proc.h> 41#include <sys/kernel.h> 42#include <sys/vnode.h> --- 510 unchanged lines hidden (view full) --- 553 register struct ufsmount *ump; 554 int error; 555 556 if (!doforce) 557 flags &= ~FORCECLOSE; 558 ump = VFSTOUFS(mp); 559#ifdef QUOTA 560 if (mp->mnt_flag & MNT_QUOTA) { | 35 */ 36 37#include <sys/param.h> 38#include <sys/systm.h> 39#include <sys/namei.h> 40#include <sys/proc.h> 41#include <sys/kernel.h> 42#include <sys/vnode.h> --- 510 unchanged lines hidden (view full) --- 553 register struct ufsmount *ump; 554 int error; 555 556 if (!doforce) 557 flags &= ~FORCECLOSE; 558 ump = VFSTOUFS(mp); 559#ifdef QUOTA 560 if (mp->mnt_flag & MNT_QUOTA) { |
561 if (error = vflush(mp, NULLVP, SKIPSYSTEM|flags)) | 561 int i; 562 error = vflush(mp, NULLVP, SKIPSYSTEM|flags); 563 if (error) |
562 return (error); 563 for (i = 0; i < MAXQUOTAS; i++) { 564 if (ump->um_quotas[i] == NULLVP) 565 continue; 566 quotaoff(p, mp, i); 567 } 568 /* 569 * Here we fall through to vflush again to ensure --- 149 unchanged lines hidden (view full) --- 719 MALLOC(ip, struct inode *, sizeof(struct inode), type, M_WAITOK); 720 bzero((caddr_t)ip, sizeof(struct inode)); 721 vp->v_data = ip; 722 ip->i_vnode = vp; 723 ip->i_fs = fs = ump->um_fs; 724 ip->i_dev = dev; 725 ip->i_number = ino; 726#ifdef QUOTA | 564 return (error); 565 for (i = 0; i < MAXQUOTAS; i++) { 566 if (ump->um_quotas[i] == NULLVP) 567 continue; 568 quotaoff(p, mp, i); 569 } 570 /* 571 * Here we fall through to vflush again to ensure --- 149 unchanged lines hidden (view full) --- 721 MALLOC(ip, struct inode *, sizeof(struct inode), type, M_WAITOK); 722 bzero((caddr_t)ip, sizeof(struct inode)); 723 vp->v_data = ip; 724 ip->i_vnode = vp; 725 ip->i_fs = fs = ump->um_fs; 726 ip->i_dev = dev; 727 ip->i_number = ino; 728#ifdef QUOTA |
729 { 730 int i; |
|
727 for (i = 0; i < MAXQUOTAS; i++) 728 ip->i_dquot[i] = NODQUOT; | 731 for (i = 0; i < MAXQUOTAS; i++) 732 ip->i_dquot[i] = NODQUOT; |
733 } |
|
729#endif 730 /* 731 * Put it onto its hash chain and lock it so that other requests for 732 * this inode will block if they arrive while we are sleeping waiting 733 * for old data structures to be purged or for the contents of the 734 * disk portion of this inode to be read. 735 */ 736 ufs_ihashins(ip); --- 148 unchanged lines hidden --- | 734#endif 735 /* 736 * Put it onto its hash chain and lock it so that other requests for 737 * this inode will block if they arrive while we are sleeping waiting 738 * for old data structures to be purged or for the contents of the 739 * disk portion of this inode to be read. 740 */ 741 ufs_ihashins(ip); --- 148 unchanged lines hidden --- |