Deleted Added
full compact
kern_lockf.c (24481) kern_lockf.c (30309)
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Scooter Morris at Genentech Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)ufs_lockf.c 8.3 (Berkeley) 1/6/94
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Scooter Morris at Genentech Inc.
7 *
8 * Redistribution and use in source and binary forms, with or without

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

29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 * SUCH DAMAGE.
35 *
36 * @(#)ufs_lockf.c 8.3 (Berkeley) 1/6/94
37 * $Id: kern_lockf.c,v 1.13 1997/02/22 09:39:06 peter Exp $
37 * $Id: kern_lockf.c,v 1.14 1997/04/01 10:30:06 bde Exp $
38 */
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/proc.h>
43#include <sys/unistd.h>
44#include <sys/vnode.h>
45#include <sys/malloc.h>

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

55
56#ifdef LOCKF_DEBUG
57#include <sys/kernel.h>
58#include <sys/sysctl.h>
59
60#include <ufs/ufs/quota.h>
61#include <ufs/ufs/inode.h>
62
38 */
39
40#include <sys/param.h>
41#include <sys/systm.h>
42#include <sys/proc.h>
43#include <sys/unistd.h>
44#include <sys/vnode.h>
45#include <sys/malloc.h>

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

55
56#ifdef LOCKF_DEBUG
57#include <sys/kernel.h>
58#include <sys/sysctl.h>
59
60#include <ufs/ufs/quota.h>
61#include <ufs/ufs/inode.h>
62
63
63static int lockf_debug = 0;
64SYSCTL_INT(_debug, OID_AUTO, lockf_debug, CTLFLAG_RW, &lockf_debug, 0, "");
65#endif
66
64static int lockf_debug = 0;
65SYSCTL_INT(_debug, OID_AUTO, lockf_debug, CTLFLAG_RW, &lockf_debug, 0, "");
66#endif
67
68MALLOC_DEFINE(M_LOCKF, "lockf", "Byte-range locking structures");
69
67#define NOLOCKF (struct lockf *)0
68#define SELF 0x1
69#define OTHERS 0x2
70static int lf_clearlock __P((struct lockf *));
71static int lf_findoverlap __P((struct lockf *,
72 struct lockf *, int, struct lockf ***, struct lockf **));
73static struct lockf *
74 lf_getblock __P((struct lockf *));

--- 720 unchanged lines hidden ---
70#define NOLOCKF (struct lockf *)0
71#define SELF 0x1
72#define OTHERS 0x2
73static int lf_clearlock __P((struct lockf *));
74static int lf_findoverlap __P((struct lockf *,
75 struct lockf *, int, struct lockf ***, struct lockf **));
76static struct lockf *
77 lf_getblock __P((struct lockf *));

--- 720 unchanged lines hidden ---