Deleted Added
full compact
null_subr.c (245004) null_subr.c (245033)
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software donated to Berkeley by
6 * Jan-Simon Pendry.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)null_subr.c 8.7 (Berkeley) 5/14/95
33 *
1/*-
2 * Copyright (c) 1992, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software donated to Berkeley by
6 * Jan-Simon Pendry.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 * SUCH DAMAGE.
31 *
32 * @(#)null_subr.c 8.7 (Berkeley) 5/14/95
33 *
34 * $FreeBSD: head/sys/fs/nullfs/null_subr.c 245004 2013-01-03 19:17:57Z kib $
34 * $FreeBSD: head/sys/fs/nullfs/null_subr.c 245033 2013-01-04 07:52:47Z kib $
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>
40#include <sys/lock.h>
41#include <sys/mutex.h>
42#include <sys/malloc.h>

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

219 }
220
221 /*
222 * The insmntque1() call below requires the exclusive lock on
223 * the nullfs vnode. Upgrade the lock now if hash failed to
224 * provide ready to use vnode.
225 */
226 if (VOP_ISLOCKED(lowervp) != LK_EXCLUSIVE) {
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>
40#include <sys/lock.h>
41#include <sys/mutex.h>
42#include <sys/malloc.h>

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

219 }
220
221 /*
222 * The insmntque1() call below requires the exclusive lock on
223 * the nullfs vnode. Upgrade the lock now if hash failed to
224 * provide ready to use vnode.
225 */
226 if (VOP_ISLOCKED(lowervp) != LK_EXCLUSIVE) {
227 KASSERT((MOUNTTONULLMOUNT(mp)->nullm_flags & NULLM_CACHE) == 0,
227 KASSERT((MOUNTTONULLMOUNT(mp)->nullm_flags & NULLM_CACHE) != 0,
228 ("lowervp %p is not excl locked and cache is disabled",
229 lowervp));
230 vn_lock(lowervp, LK_UPGRADE | LK_RETRY);
231 if ((lowervp->v_iflag & VI_DOOMED) != 0) {
232 vput(lowervp);
233 return (ENOENT);
234 }
235 }

--- 90 unchanged lines hidden ---
228 ("lowervp %p is not excl locked and cache is disabled",
229 lowervp));
230 vn_lock(lowervp, LK_UPGRADE | LK_RETRY);
231 if ((lowervp->v_iflag & VI_DOOMED) != 0) {
232 vput(lowervp);
233 return (ENOENT);
234 }
235 }

--- 90 unchanged lines hidden ---