Deleted Added
full compact
vfs_export.c (65770) vfs_export.c (66067)
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.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
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.

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

31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
39 * $FreeBSD: head/sys/kern/vfs_export.c 65770 2000-09-12 09:49:08Z bp $
39 * $FreeBSD: head/sys/kern/vfs_export.c 66067 2000-09-19 10:28:44Z phk $
40 */
41
42/*
43 * External virtual filesystem routines
44 */
45#include "opt_ddb.h"
46#include "opt_ffs.h"
47

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

1856 if (vp->v_mount != NULL)
1857 insmntque(vp, (struct mount *)0);
1858 /*
1859 * If special device, remove it from special device alias list
1860 * if it is on one.
1861 */
1862 if ((vp->v_type == VBLK || vp->v_type == VCHR) && vp->v_rdev != NULL) {
1863 simple_lock(&spechash_slock);
40 */
41
42/*
43 * External virtual filesystem routines
44 */
45#include "opt_ddb.h"
46#include "opt_ffs.h"
47

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

1856 if (vp->v_mount != NULL)
1857 insmntque(vp, (struct mount *)0);
1858 /*
1859 * If special device, remove it from special device alias list
1860 * if it is on one.
1861 */
1862 if ((vp->v_type == VBLK || vp->v_type == VCHR) && vp->v_rdev != NULL) {
1863 simple_lock(&spechash_slock);
1864 SLIST_REMOVE(&vp->v_hashchain, vp, vnode, v_specnext);
1864 SLIST_REMOVE(&vp->v_rdev->si_hlist, vp, vnode, v_specnext);
1865 freedev(vp->v_rdev);
1866 simple_unlock(&spechash_slock);
1867 vp->v_rdev = NULL;
1868 }
1869
1870 /*
1871 * If it is on the freelist and not already at the head,
1872 * move it to the head of the list. The test of the

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

1924vcount(vp)
1925 struct vnode *vp;
1926{
1927 struct vnode *vq;
1928 int count;
1929
1930 count = 0;
1931 simple_lock(&spechash_slock);
1865 freedev(vp->v_rdev);
1866 simple_unlock(&spechash_slock);
1867 vp->v_rdev = NULL;
1868 }
1869
1870 /*
1871 * If it is on the freelist and not already at the head,
1872 * move it to the head of the list. The test of the

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

1924vcount(vp)
1925 struct vnode *vp;
1926{
1927 struct vnode *vq;
1928 int count;
1929
1930 count = 0;
1931 simple_lock(&spechash_slock);
1932 SLIST_FOREACH(vq, &vp->v_hashchain, v_specnext)
1932 SLIST_FOREACH(vq, &vp->v_rdev->si_hlist, v_specnext)
1933 count += vq->v_usecount;
1934 simple_unlock(&spechash_slock);
1935 return (count);
1936}
1937
1938/*
1939 * Same as above, but using the dev_t as argument
1940 */

--- 1097 unchanged lines hidden ---
1933 count += vq->v_usecount;
1934 simple_unlock(&spechash_slock);
1935 return (count);
1936}
1937
1938/*
1939 * Same as above, but using the dev_t as argument
1940 */

--- 1097 unchanged lines hidden ---