union_subr.c (30d49d536b0f274cdb8e198602bd1a76ea0a78ed) union_subr.c (abd80ddb9474948fb291becc395d72b40927a32b)
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1994 Jan-Simon Pendry
5 * Copyright (c) 1994
6 * The Regents of the University of California. All rights reserved.
7 * Copyright (c) 2005, 2006, 2012 Masanori Ozawa <ozawa@ongs.co.jp>, ONGS Inc.
8 * Copyright (c) 2006, 2012 Daichi Goto <daichi@freebsd.org>

--- 113 unchanged lines hidden (view full) ---

122 VI_LOCK(dvp);
123 hd = unionfs_get_hashhead(dvp, path);
124 LIST_FOREACH(unp, hd, un_hash) {
125 if (!strcmp(unp->un_path, path)) {
126 vp = UNIONFSTOV(unp);
127 VI_LOCK_FLAGS(vp, MTX_DUPOK);
128 VI_UNLOCK(dvp);
129 vp->v_iflag &= ~VI_OWEINACT;
1/*-
2 * SPDX-License-Identifier: BSD-3-Clause
3 *
4 * Copyright (c) 1994 Jan-Simon Pendry
5 * Copyright (c) 1994
6 * The Regents of the University of California. All rights reserved.
7 * Copyright (c) 2005, 2006, 2012 Masanori Ozawa <ozawa@ongs.co.jp>, ONGS Inc.
8 * Copyright (c) 2006, 2012 Daichi Goto <daichi@freebsd.org>

--- 113 unchanged lines hidden (view full) ---

122 VI_LOCK(dvp);
123 hd = unionfs_get_hashhead(dvp, path);
124 LIST_FOREACH(unp, hd, un_hash) {
125 if (!strcmp(unp->un_path, path)) {
126 vp = UNIONFSTOV(unp);
127 VI_LOCK_FLAGS(vp, MTX_DUPOK);
128 VI_UNLOCK(dvp);
129 vp->v_iflag &= ~VI_OWEINACT;
130 if ((vp->v_iflag & (VI_DOOMED | VI_DOINGINACT)) != 0) {
130 if (VN_IS_DOOMED(vp) ||
131 ((vp->v_iflag & VI_DOINGINACT) != 0)) {
131 VI_UNLOCK(vp);
132 vp = NULLVP;
133 } else
134 VI_UNLOCK(vp);
135 return (vp);
136 }
137 }
138 VI_UNLOCK(dvp);

--- 19 unchanged lines hidden (view full) ---

158
159 VI_LOCK(dvp);
160 hd = unionfs_get_hashhead(dvp, path);
161 LIST_FOREACH(unp, hd, un_hash) {
162 if (!strcmp(unp->un_path, path)) {
163 vp = UNIONFSTOV(unp);
164 VI_LOCK_FLAGS(vp, MTX_DUPOK);
165 vp->v_iflag &= ~VI_OWEINACT;
132 VI_UNLOCK(vp);
133 vp = NULLVP;
134 } else
135 VI_UNLOCK(vp);
136 return (vp);
137 }
138 }
139 VI_UNLOCK(dvp);

--- 19 unchanged lines hidden (view full) ---

159
160 VI_LOCK(dvp);
161 hd = unionfs_get_hashhead(dvp, path);
162 LIST_FOREACH(unp, hd, un_hash) {
163 if (!strcmp(unp->un_path, path)) {
164 vp = UNIONFSTOV(unp);
165 VI_LOCK_FLAGS(vp, MTX_DUPOK);
166 vp->v_iflag &= ~VI_OWEINACT;
166 if ((vp->v_iflag & (VI_DOOMED | VI_DOINGINACT)) != 0) {
167 if (VN_IS_DOOMED(vp) ||
168 ((vp->v_iflag & VI_DOINGINACT) != 0)) {
167 LIST_INSERT_HEAD(hd, uncp, un_hash);
168 VI_UNLOCK(vp);
169 vp = NULLVP;
170 } else
171 VI_UNLOCK(vp);
172 VI_UNLOCK(dvp);
173 return (vp);
174 }

--- 1105 unchanged lines hidden ---
169 LIST_INSERT_HEAD(hd, uncp, un_hash);
170 VI_UNLOCK(vp);
171 vp = NULLVP;
172 } else
173 VI_UNLOCK(vp);
174 VI_UNLOCK(dvp);
175 return (vp);
176 }

--- 1105 unchanged lines hidden ---