| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: ufs_vnops.c,v 1.179 2009/07/03 21:17:42 elad Exp $ */ | | 1 | /* $NetBSD: ufs_vnops.c,v 1.180 2009/10/14 09:40:27 hannken Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2008 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2008 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Wasabi Systems, Inc. | | 8 | * by Wasabi Systems, Inc. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -56,27 +56,27 @@ | | | @@ -56,27 +56,27 @@ |
56 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 56 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
57 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 57 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
58 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 58 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
59 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 59 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
60 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 60 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
61 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 61 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
62 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 62 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
63 | * SUCH DAMAGE. | | 63 | * SUCH DAMAGE. |
64 | * | | 64 | * |
65 | * @(#)ufs_vnops.c 8.28 (Berkeley) 7/31/95 | | 65 | * @(#)ufs_vnops.c 8.28 (Berkeley) 7/31/95 |
66 | */ | | 66 | */ |
67 | | | 67 | |
68 | #include <sys/cdefs.h> | | 68 | #include <sys/cdefs.h> |
69 | __KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.179 2009/07/03 21:17:42 elad Exp $"); | | 69 | __KERNEL_RCSID(0, "$NetBSD: ufs_vnops.c,v 1.180 2009/10/14 09:40:27 hannken Exp $"); |
70 | | | 70 | |
71 | #if defined(_KERNEL_OPT) | | 71 | #if defined(_KERNEL_OPT) |
72 | #include "opt_ffs.h" | | 72 | #include "opt_ffs.h" |
73 | #include "opt_quota.h" | | 73 | #include "opt_quota.h" |
74 | #endif | | 74 | #endif |
75 | | | 75 | |
76 | #include <sys/param.h> | | 76 | #include <sys/param.h> |
77 | #include <sys/systm.h> | | 77 | #include <sys/systm.h> |
78 | #include <sys/namei.h> | | 78 | #include <sys/namei.h> |
79 | #include <sys/resourcevar.h> | | 79 | #include <sys/resourcevar.h> |
80 | #include <sys/kernel.h> | | 80 | #include <sys/kernel.h> |
81 | #include <sys/file.h> | | 81 | #include <sys/file.h> |
82 | #include <sys/stat.h> | | 82 | #include <sys/stat.h> |
| @@ -1580,29 +1580,29 @@ ufs_rmdir(void *v) | | | @@ -1580,29 +1580,29 @@ ufs_rmdir(void *v) |
1580 | error = UFS_TRUNCATE(vp, (off_t)0, IO_SYNC, cnp->cn_cred); | | 1580 | error = UFS_TRUNCATE(vp, (off_t)0, IO_SYNC, cnp->cn_cred); |
1581 | cache_purge(vp); | | 1581 | cache_purge(vp); |
1582 | /* | | 1582 | /* |
1583 | * Unlock the log while we still have reference to unlinked | | 1583 | * Unlock the log while we still have reference to unlinked |
1584 | * directory vp so that it will not get locked for recycling | | 1584 | * directory vp so that it will not get locked for recycling |
1585 | */ | | 1585 | */ |
1586 | UFS_WAPBL_END(dvp->v_mount); | | 1586 | UFS_WAPBL_END(dvp->v_mount); |
1587 | #ifdef UFS_DIRHASH | | 1587 | #ifdef UFS_DIRHASH |
1588 | if (ip->i_dirhash != NULL) | | 1588 | if (ip->i_dirhash != NULL) |
1589 | ufsdirhash_free(ip); | | 1589 | ufsdirhash_free(ip); |
1590 | #endif | | 1590 | #endif |
1591 | out: | | 1591 | out: |
1592 | VN_KNOTE(vp, NOTE_DELETE); | | 1592 | VN_KNOTE(vp, NOTE_DELETE); |
1593 | fstrans_done(dvp->v_mount); | | | |
1594 | vput(dvp); | | 1593 | vput(dvp); |
1595 | vput(vp); | | 1594 | vput(vp); |
| | | 1595 | fstrans_done(dvp->v_mount); |
1596 | return (error); | | 1596 | return (error); |
1597 | } | | 1597 | } |
1598 | | | 1598 | |
1599 | /* | | 1599 | /* |
1600 | * symlink -- make a symbolic link | | 1600 | * symlink -- make a symbolic link |
1601 | */ | | 1601 | */ |
1602 | int | | 1602 | int |
1603 | ufs_symlink(void *v) | | 1603 | ufs_symlink(void *v) |
1604 | { | | 1604 | { |
1605 | struct vop_symlink_args /* { | | 1605 | struct vop_symlink_args /* { |
1606 | struct vnode *a_dvp; | | 1606 | struct vnode *a_dvp; |
1607 | struct vnode **a_vpp; | | 1607 | struct vnode **a_vpp; |
1608 | struct componentname *a_cnp; | | 1608 | struct componentname *a_cnp; |