Deleted Added
full compact
nfs_lock.c (114216) nfs_lock.c (114434)
1/*-
2 * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * from BSDI nfs_lock.c,v 2.4 1998/12/14 23:49:56 jch Exp
29 */
30
31#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1997 Berkeley Software Design, Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 * SUCH DAMAGE.
27 *
28 * from BSDI nfs_lock.c,v 2.4 1998/12/14 23:49:56 jch Exp
29 */
30
31#include <sys/cdefs.h>
32__FBSDID("$FreeBSD: head/sys/nfsclient/nfs_lock.c 114216 2003-04-29 13:36:06Z kan $");
32__FBSDID("$FreeBSD: head/sys/nfsclient/nfs_lock.c 114434 2003-05-01 16:59:23Z des $");
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/fcntl.h>
37#include <sys/kernel.h> /* for hz */
38#include <sys/limits.h>
39#include <sys/lock.h>
40#include <sys/malloc.h>

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

110 msg.lm_msg_ident.pid = p->p_pid;
111 /*
112 * if there is no nfsowner table yet, allocate one.
113 */
114 if (p->p_nlminfo == NULL) {
115 MALLOC(p->p_nlminfo, struct nlminfo *,
116 sizeof(struct nlminfo), M_LOCKF, M_WAITOK | M_ZERO);
117 p->p_nlminfo->pid_start = p->p_stats->p_start;
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/fcntl.h>
37#include <sys/kernel.h> /* for hz */
38#include <sys/limits.h>
39#include <sys/lock.h>
40#include <sys/malloc.h>

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

110 msg.lm_msg_ident.pid = p->p_pid;
111 /*
112 * if there is no nfsowner table yet, allocate one.
113 */
114 if (p->p_nlminfo == NULL) {
115 MALLOC(p->p_nlminfo, struct nlminfo *,
116 sizeof(struct nlminfo), M_LOCKF, M_WAITOK | M_ZERO);
117 p->p_nlminfo->pid_start = p->p_stats->p_start;
118 timevaladd(&p->p_nlminfo->pid_start, &boottime);
118 }
119 msg.lm_msg_ident.pid_start = p->p_nlminfo->pid_start;
120 msg.lm_msg_ident.msg_seq = ++(p->p_nlminfo->msg_seq);
121
122 msg.lm_fl = *fl;
123 msg.lm_wait = ap->a_flags & F_WAIT;
124 msg.lm_getlk = ap->a_op == F_GETLK;
125 bcopy(VFSTONFS(vp->v_mount)->nm_nam, &msg.lm_addr,

--- 149 unchanged lines hidden ---
119 }
120 msg.lm_msg_ident.pid_start = p->p_nlminfo->pid_start;
121 msg.lm_msg_ident.msg_seq = ++(p->p_nlminfo->msg_seq);
122
123 msg.lm_fl = *fl;
124 msg.lm_wait = ap->a_flags & F_WAIT;
125 msg.lm_getlk = ap->a_op == F_GETLK;
126 bcopy(VFSTONFS(vp->v_mount)->nm_nam, &msg.lm_addr,

--- 149 unchanged lines hidden ---