| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: hfs_vfsops.c,v 1.23 2009/11/27 16:11:35 pooka Exp $ */ | | 1 | /* $NetBSD: hfs_vfsops.c,v 1.24 2009/12/03 14:29:04 pooka Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2005, 2007 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2005, 2007 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 Yevgeny Binder and Dieter Baron. | | 8 | * by Yevgeny Binder and Dieter Baron. |
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. |
| @@ -89,27 +89,27 @@ | | | @@ -89,27 +89,27 @@ |
89 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 89 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
90 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 90 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
91 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 91 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
92 | * SUCH DAMAGE. | | 92 | * SUCH DAMAGE. |
93 | */ | | 93 | */ |
94 | | | 94 | |
95 | | | 95 | |
96 | | | 96 | |
97 | /* | | 97 | /* |
98 | * Apple HFS+ filesystem | | 98 | * Apple HFS+ filesystem |
99 | */ | | 99 | */ |
100 | | | 100 | |
101 | #include <sys/cdefs.h> | | 101 | #include <sys/cdefs.h> |
102 | __KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.23 2009/11/27 16:11:35 pooka Exp $"); | | 102 | __KERNEL_RCSID(0, "$NetBSD: hfs_vfsops.c,v 1.24 2009/12/03 14:29:04 pooka Exp $"); |
103 | | | 103 | |
104 | #ifdef _KERNEL_OPT | | 104 | #ifdef _KERNEL_OPT |
105 | #include "opt_compat_netbsd.h" | | 105 | #include "opt_compat_netbsd.h" |
106 | #endif | | 106 | #endif |
107 | | | 107 | |
108 | #include <sys/param.h> | | 108 | #include <sys/param.h> |
109 | #include <sys/systm.h> | | 109 | #include <sys/systm.h> |
110 | #include <sys/namei.h> | | 110 | #include <sys/namei.h> |
111 | #include <sys/proc.h> | | 111 | #include <sys/proc.h> |
112 | #include <sys/kernel.h> | | 112 | #include <sys/kernel.h> |
113 | #include <sys/vnode.h> | | 113 | #include <sys/vnode.h> |
114 | #include <sys/socket.h> | | 114 | #include <sys/socket.h> |
115 | #include <sys/mount.h> | | 115 | #include <sys/mount.h> |
| @@ -428,27 +428,27 @@ hfs_unmount(struct mount *mp, int mntfla | | | @@ -428,27 +428,27 @@ hfs_unmount(struct mount *mp, int mntfla |
428 | | | 428 | |
429 | flags = 0; | | 429 | flags = 0; |
430 | if (mntflags & MNT_FORCE) | | 430 | if (mntflags & MNT_FORCE) |
431 | flags |= FORCECLOSE; | | 431 | flags |= FORCECLOSE; |
432 | | | 432 | |
433 | if ((error = vflush(mp, NULLVP, flags)) != 0) | | 433 | if ((error = vflush(mp, NULLVP, flags)) != 0) |
434 | return error; | | 434 | return error; |
435 | | | 435 | |
436 | hfslib_init_cbargs(&cbargs); | | 436 | hfslib_init_cbargs(&cbargs); |
437 | argsclose.l = curlwp; | | 437 | argsclose.l = curlwp; |
438 | cbargs.closevol = (void*)&argsclose; | | 438 | cbargs.closevol = (void*)&argsclose; |
439 | hfslib_close_volume(&hmp->hm_vol, &cbargs); | | 439 | hfslib_close_volume(&hmp->hm_vol, &cbargs); |
440 | | | 440 | |
441 | vput(hmp->hm_devvp); | | 441 | vrele(hmp->hm_devvp); |
442 | | | 442 | |
443 | free(hmp, M_HFSMNT); | | 443 | free(hmp, M_HFSMNT); |
444 | mp->mnt_data = NULL; | | 444 | mp->mnt_data = NULL; |
445 | mp->mnt_flag &= ~MNT_LOCAL; | | 445 | mp->mnt_flag &= ~MNT_LOCAL; |
446 | | | 446 | |
447 | return error; | | 447 | return error; |
448 | } | | 448 | } |
449 | | | 449 | |
450 | int | | 450 | int |
451 | hfs_root(struct mount *mp, struct vnode **vpp) | | 451 | hfs_root(struct mount *mp, struct vnode **vpp) |
452 | { | | 452 | { |
453 | struct vnode *nvp; | | 453 | struct vnode *nvp; |
454 | int error; | | 454 | int error; |