| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: overlay_vfsops.c,v 1.71 2020/04/13 19:23:19 ad Exp $ */ | | 1 | /* $NetBSD: overlay_vfsops.c,v 1.72 2022/07/08 07:43:48 hannken Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1999, 2000 National Aeronautics & Space Administration | | 4 | * Copyright (c) 1999, 2000 National Aeronautics & Space Administration |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This software was written by William Studenmund of the | | 7 | * This software was written by William Studenmund of the |
8 | * Numerical Aerospace Simulation Facility, NASA Ames Research Center. | | 8 | * Numerical Aerospace Simulation Facility, NASA Ames Research Center. |
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. |
| @@ -64,27 +64,27 @@ | | | @@ -64,27 +64,27 @@ |
64 | * SUCH DAMAGE. | | 64 | * SUCH DAMAGE. |
65 | * | | 65 | * |
66 | * from: Id: lofs_vfsops.c,v 1.9 1992/05/30 10:26:24 jsp Exp | | 66 | * from: Id: lofs_vfsops.c,v 1.9 1992/05/30 10:26:24 jsp Exp |
67 | * from: @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92 | | 67 | * from: @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92 |
68 | * @(#)null_vfsops.c 8.7 (Berkeley) 5/14/95 | | 68 | * @(#)null_vfsops.c 8.7 (Berkeley) 5/14/95 |
69 | */ | | 69 | */ |
70 | | | 70 | |
71 | /* | | 71 | /* |
72 | * Overlay Layer | | 72 | * Overlay Layer |
73 | * (See overlay_vnops.c for a description of what this does.) | | 73 | * (See overlay_vnops.c for a description of what this does.) |
74 | */ | | 74 | */ |
75 | | | 75 | |
76 | #include <sys/cdefs.h> | | 76 | #include <sys/cdefs.h> |
77 | __KERNEL_RCSID(0, "$NetBSD: overlay_vfsops.c,v 1.71 2020/04/13 19:23:19 ad Exp $"); | | 77 | __KERNEL_RCSID(0, "$NetBSD: overlay_vfsops.c,v 1.72 2022/07/08 07:43:48 hannken Exp $"); |
78 | | | 78 | |
79 | #include <sys/param.h> | | 79 | #include <sys/param.h> |
80 | #include <sys/systm.h> | | 80 | #include <sys/systm.h> |
81 | #include <sys/sysctl.h> | | 81 | #include <sys/sysctl.h> |
82 | #include <sys/time.h> | | 82 | #include <sys/time.h> |
83 | #include <sys/proc.h> | | 83 | #include <sys/proc.h> |
84 | #include <sys/vnode.h> | | 84 | #include <sys/vnode.h> |
85 | #include <sys/mount.h> | | 85 | #include <sys/mount.h> |
86 | #include <sys/namei.h> | | 86 | #include <sys/namei.h> |
87 | #include <sys/module.h> | | 87 | #include <sys/module.h> |
88 | #include <miscfs/overlay/overlay.h> | | 88 | #include <miscfs/overlay/overlay.h> |
89 | #include <miscfs/genfs/layer_extern.h> | | 89 | #include <miscfs/genfs/layer_extern.h> |
90 | | | 90 | |
| @@ -126,27 +126,27 @@ ov_mount(struct mount *mp, const char *p | | | @@ -126,27 +126,27 @@ ov_mount(struct mount *mp, const char *p |
126 | } | | 126 | } |
127 | | | 127 | |
128 | /* | | 128 | /* |
129 | * Update is not supported | | 129 | * Update is not supported |
130 | */ | | 130 | */ |
131 | if (mp->mnt_flag & MNT_UPDATE) | | 131 | if (mp->mnt_flag & MNT_UPDATE) |
132 | return EOPNOTSUPP; | | 132 | return EOPNOTSUPP; |
133 | | | 133 | |
134 | /* | | 134 | /* |
135 | * Find lower node | | 135 | * Find lower node |
136 | */ | | 136 | */ |
137 | lowerrootvp = mp->mnt_vnodecovered; | | 137 | lowerrootvp = mp->mnt_vnodecovered; |
138 | vref(lowerrootvp); | | 138 | vref(lowerrootvp); |
139 | if ((error = vn_lock(lowerrootvp, LK_EXCLUSIVE | LK_RETRY))) { | | 139 | if ((error = vn_lock(lowerrootvp, LK_EXCLUSIVE))) { |
140 | vrele(lowerrootvp); | | 140 | vrele(lowerrootvp); |
141 | return (error); | | 141 | return (error); |
142 | } | | 142 | } |
143 | | | 143 | |
144 | /* | | 144 | /* |
145 | * First cut at fixing up upper mount point | | 145 | * First cut at fixing up upper mount point |
146 | */ | | 146 | */ |
147 | nmp = kmem_zalloc(sizeof(struct overlay_mount), KM_SLEEP); | | 147 | nmp = kmem_zalloc(sizeof(struct overlay_mount), KM_SLEEP); |
148 | | | 148 | |
149 | mp->mnt_data = nmp; | | 149 | mp->mnt_data = nmp; |
150 | | | 150 | |
151 | /* | | 151 | /* |
152 | * Make sure that the mount point is sufficiently initialized | | 152 | * Make sure that the mount point is sufficiently initialized |