| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: ffs_wapbl.c,v 1.32 2016/09/24 21:00:54 jdolecek Exp $ */ | | 1 | /* $NetBSD: ffs_wapbl.c,v 1.33 2016/10/01 13:06:20 jdolecek Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2003,2006,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. |
| @@ -20,27 +20,27 @@ | | | @@ -20,27 +20,27 @@ |
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
29 | * POSSIBILITY OF SUCH DAMAGE. | | 29 | * POSSIBILITY OF SUCH DAMAGE. |
30 | */ | | 30 | */ |
31 | | | 31 | |
32 | #include <sys/cdefs.h> | | 32 | #include <sys/cdefs.h> |
33 | __KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.32 2016/09/24 21:00:54 jdolecek Exp $"); | | 33 | __KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.33 2016/10/01 13:06:20 jdolecek Exp $"); |
34 | | | 34 | |
35 | #define WAPBL_INTERNAL | | 35 | #define WAPBL_INTERNAL |
36 | | | 36 | |
37 | #if defined(_KERNEL_OPT) | | 37 | #if defined(_KERNEL_OPT) |
38 | #include "opt_ffs.h" | | 38 | #include "opt_ffs.h" |
39 | #endif | | 39 | #endif |
40 | | | 40 | |
41 | #include <sys/param.h> | | 41 | #include <sys/param.h> |
42 | #include <sys/systm.h> | | 42 | #include <sys/systm.h> |
43 | #include <sys/kernel.h> | | 43 | #include <sys/kernel.h> |
44 | #include <sys/vnode.h> | | 44 | #include <sys/vnode.h> |
45 | #include <sys/mount.h> | | 45 | #include <sys/mount.h> |
46 | #include <sys/file.h> | | 46 | #include <sys/file.h> |
| @@ -267,26 +267,27 @@ wapbl_remove_log(struct mount *mp) | | | @@ -267,26 +267,27 @@ wapbl_remove_log(struct mount *mp) |
267 | "%" PRId64 "\n", log_ino); | | 267 | "%" PRId64 "\n", log_ino); |
268 | vput(vp); | | 268 | vput(vp); |
269 | /* clear out log info on error */ | | 269 | /* clear out log info on error */ |
270 | goto done; | | 270 | goto done; |
271 | } | | 271 | } |
272 | | | 272 | |
273 | /* | | 273 | /* |
274 | * remove the log inode by setting its link count back | | 274 | * remove the log inode by setting its link count back |
275 | * to zero and bail. | | 275 | * to zero and bail. |
276 | */ | | 276 | */ |
277 | ip->i_nlink = 0; | | 277 | ip->i_nlink = 0; |
278 | DIP_ASSIGN(ip, nlink, 0); | | 278 | DIP_ASSIGN(ip, nlink, 0); |
279 | vput(vp); | | 279 | vput(vp); |
| | | 280 | break; |
280 | | | 281 | |
281 | case UFS_WAPBL_JOURNALLOC_END_PARTITION: | | 282 | case UFS_WAPBL_JOURNALLOC_END_PARTITION: |
282 | DPRINTF("end-of-partition log\n"); | | 283 | DPRINTF("end-of-partition log\n"); |
283 | /* no extra work required */ | | 284 | /* no extra work required */ |
284 | break; | | 285 | break; |
285 | | | 286 | |
286 | default: | | 287 | default: |
287 | printf("ffs_wapbl: unknown journal type %d\n", | | 288 | printf("ffs_wapbl: unknown journal type %d\n", |
288 | fs->fs_journal_location); | | 289 | fs->fs_journal_location); |
289 | break; | | 290 | break; |
290 | } | | 291 | } |
291 | | | 292 | |
292 | | | 293 | |