Deleted Added
full compact
union_vfsops.c (128019) union_vfsops.c (132023)
1/*
2 * Copyright (c) 1994, 1995 The Regents of the University of California.
3 * Copyright (c) 1994, 1995 Jan-Simon Pendry.
4 * All rights reserved.
5 *
6 * This code is derived from software donated to Berkeley by
7 * Jan-Simon Pendry.
8 *

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)union_vfsops.c 8.20 (Berkeley) 5/20/95
1/*
2 * Copyright (c) 1994, 1995 The Regents of the University of California.
3 * Copyright (c) 1994, 1995 Jan-Simon Pendry.
4 * All rights reserved.
5 *
6 * This code is derived from software donated to Berkeley by
7 * Jan-Simon Pendry.
8 *

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

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * @(#)union_vfsops.c 8.20 (Berkeley) 5/20/95
34 * $FreeBSD: head/sys/fs/unionfs/union_vfsops.c 128019 2004-04-07 20:46:16Z imp $
34 * $FreeBSD: head/sys/fs/unionfs/union_vfsops.c 132023 2004-07-12 08:14:09Z alfred $
35 */
36
37/*
38 * Union Layer
39 */
40
41#include <sys/param.h>
42#include <sys/systm.h>

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

337 * Keep flushing vnodes from the mount list.
338 * This is needed because of the un_pvp held
339 * reference to the parent vnode.
340 * If more vnodes have been freed on a given pass,
341 * the try again. The loop will iterate at most
342 * (d) times, where (d) is the maximum tree depth
343 * in the filesystem.
344 */
35 */
36
37/*
38 * Union Layer
39 */
40
41#include <sys/param.h>
42#include <sys/systm.h>

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

337 * Keep flushing vnodes from the mount list.
338 * This is needed because of the un_pvp held
339 * reference to the parent vnode.
340 * If more vnodes have been freed on a given pass,
341 * the try again. The loop will iterate at most
342 * (d) times, where (d) is the maximum tree depth
343 * in the filesystem.
344 */
345 for (freeing = 0; (error = vflush(mp, 0, flags)) != 0;) {
345 for (freeing = 0; (error = vflush(mp, 0, flags, td)) != 0;) {
346 int n;
347
348 /* count #vnodes held on mount list */
349 n = mp->mnt_nvnodelistsize;
350
351 /* if this is unchanged then stop */
352 if (n == freeing)
353 break;

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

373 * Finally, throw away the union_mount structure.
374 */
375 free(mp->mnt_data, M_UNIONFSMNT); /* XXX */
376 mp->mnt_data = 0;
377 return (0);
378}
379
380static int
346 int n;
347
348 /* count #vnodes held on mount list */
349 n = mp->mnt_nvnodelistsize;
350
351 /* if this is unchanged then stop */
352 if (n == freeing)
353 break;

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

373 * Finally, throw away the union_mount structure.
374 */
375 free(mp->mnt_data, M_UNIONFSMNT); /* XXX */
376 mp->mnt_data = 0;
377 return (0);
378}
379
380static int
381union_root(mp, vpp)
381union_root(mp, vpp, td)
382 struct mount *mp;
383 struct vnode **vpp;
382 struct mount *mp;
383 struct vnode **vpp;
384 struct thread *td;
384{
385 struct union_mount *um = MOUNTTOUNIONMOUNT(mp);
386 int error;
387
388 /*
389 * Supply an unlocked reference to um_uppervp and to um_lowervp. It
390 * is possible for um_uppervp to be locked without the associated
391 * root union_node being locked. We let union_allocvp() deal with

--- 103 unchanged lines hidden ---
385{
386 struct union_mount *um = MOUNTTOUNIONMOUNT(mp);
387 int error;
388
389 /*
390 * Supply an unlocked reference to um_uppervp and to um_lowervp. It
391 * is possible for um_uppervp to be locked without the associated
392 * root union_node being locked. We let union_allocvp() deal with

--- 103 unchanged lines hidden ---