vfs_subr.c (7b255097ebe2ad41b82191fdf0e25245946ea95e) vfs_subr.c (411455a8fbcfbb51e60fb5f5d4a02d6e76c0a88c)
1/*-
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

2640 return;
2641 }
2642
2643 v_decr_devcount(vp);
2644
2645 error = 0;
2646
2647 if (vp->v_usecount != 0) {
1/*-
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

2640 return;
2641 }
2642
2643 v_decr_devcount(vp);
2644
2645 error = 0;
2646
2647 if (vp->v_usecount != 0) {
2648 vprint("vputx: usecount not zero", vp);
2648 vn_printf(vp, "vputx: usecount not zero for vnode ");
2649 panic("vputx: usecount not zero");
2650 }
2651
2652 CTR2(KTR_VFS, "%s: return vnode %p to the freelist", __func__, vp);
2653
2654 /*
2655 * We must call VOP_INACTIVE with the node locked. Mark
2656 * as VI_DOINGINACT to avoid recursion.

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

3031 * If FORCECLOSE is set, forcibly close the vnode.
3032 */
3033 if (vp->v_usecount == 0 || (flags & FORCECLOSE)) {
3034 vgonel(vp);
3035 } else {
3036 busy++;
3037#ifdef DIAGNOSTIC
3038 if (busyprt)
2649 panic("vputx: usecount not zero");
2650 }
2651
2652 CTR2(KTR_VFS, "%s: return vnode %p to the freelist", __func__, vp);
2653
2654 /*
2655 * We must call VOP_INACTIVE with the node locked. Mark
2656 * as VI_DOINGINACT to avoid recursion.

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

3031 * If FORCECLOSE is set, forcibly close the vnode.
3032 */
3033 if (vp->v_usecount == 0 || (flags & FORCECLOSE)) {
3034 vgonel(vp);
3035 } else {
3036 busy++;
3037#ifdef DIAGNOSTIC
3038 if (busyprt)
3039 vprint("vflush: busy vnode", vp);
3039 vn_printf(vp, "vflush: busy vnode ");
3040#endif
3041 }
3042 VOP_UNLOCK(vp, 0);
3043 vdropl(vp);
3044 }
3045 if (rootrefs > 0 && (flags & FORCECLOSE) == 0) {
3046 /*
3047 * If just the root vnode is busy, and if its refcount

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

3404 * for these structures, which means we could catch an inconsistent
3405 * state and dereference a nasty pointer. Not much to be done
3406 * about that.
3407 */
3408 db_printf("Locked vnodes\n");
3409 TAILQ_FOREACH(mp, &mountlist, mnt_list) {
3410 TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) {
3411 if (vp->v_type != VMARKER && VOP_ISLOCKED(vp))
3040#endif
3041 }
3042 VOP_UNLOCK(vp, 0);
3043 vdropl(vp);
3044 }
3045 if (rootrefs > 0 && (flags & FORCECLOSE) == 0) {
3046 /*
3047 * If just the root vnode is busy, and if its refcount

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

3404 * for these structures, which means we could catch an inconsistent
3405 * state and dereference a nasty pointer. Not much to be done
3406 * about that.
3407 */
3408 db_printf("Locked vnodes\n");
3409 TAILQ_FOREACH(mp, &mountlist, mnt_list) {
3410 TAILQ_FOREACH(vp, &mp->mnt_nvnodelist, v_nmntvnodes) {
3411 if (vp->v_type != VMARKER && VOP_ISLOCKED(vp))
3412 vprint("", vp);
3412 vn_printf(vp, "vnode ");
3413 }
3414 }
3415}
3416
3417/*
3418 * Show details about the given vnode.
3419 */
3420DB_SHOW_COMMAND(vnode, db_show_vnode)

--- 1901 unchanged lines hidden ---
3413 }
3414 }
3415}
3416
3417/*
3418 * Show details about the given vnode.
3419 */
3420DB_SHOW_COMMAND(vnode, db_show_vnode)

--- 1901 unchanged lines hidden ---