Deleted Added
full compact
kern_descrip.c (218019) kern_descrip.c (218757)
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1991, 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.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
35 */
36
37#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1982, 1986, 1989, 1991, 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.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/kern/kern_descrip.c 218019 2011-01-28 15:29:35Z jilles $");
38__FBSDID("$FreeBSD: head/sys/kern/kern_descrip.c 218757 2011-02-16 21:29:13Z bz $");
39
40#include "opt_compat.h"
41#include "opt_ddb.h"
42#include "opt_ktrace.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46

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

73#include <sys/tty.h>
74#include <sys/unistd.h>
75#include <sys/user.h>
76#include <sys/vnode.h>
77#ifdef KTRACE
78#include <sys/ktrace.h>
79#endif
80
39
40#include "opt_compat.h"
41#include "opt_ddb.h"
42#include "opt_ktrace.h"
43
44#include <sys/param.h>
45#include <sys/systm.h>
46

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

73#include <sys/tty.h>
74#include <sys/unistd.h>
75#include <sys/user.h>
76#include <sys/vnode.h>
77#ifdef KTRACE
78#include <sys/ktrace.h>
79#endif
80
81#include <net/vnet.h>
82
81#include <security/audit/audit.h>
82
83#include <vm/uma.h>
84
85#include <ddb/ddb.h>
86
87static MALLOC_DEFINE(M_FILEDESC, "filedesc", "Open file descriptor table");
88static MALLOC_DEFINE(M_FILEDESC_TO_LEADER, "filedesc_to_leader",

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

2325 * Note: fputsock() is deprecated, see comment for fgetsock().
2326 */
2327void
2328fputsock(struct socket *so)
2329{
2330
2331 ACCEPT_LOCK();
2332 SOCK_LOCK(so);
83#include <security/audit/audit.h>
84
85#include <vm/uma.h>
86
87#include <ddb/ddb.h>
88
89static MALLOC_DEFINE(M_FILEDESC, "filedesc", "Open file descriptor table");
90static MALLOC_DEFINE(M_FILEDESC_TO_LEADER, "filedesc_to_leader",

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

2327 * Note: fputsock() is deprecated, see comment for fgetsock().
2328 */
2329void
2330fputsock(struct socket *so)
2331{
2332
2333 ACCEPT_LOCK();
2334 SOCK_LOCK(so);
2335 CURVNET_SET(so->so_vnet);
2333 sorele(so);
2336 sorele(so);
2337 CURVNET_RESTORE();
2334}
2335
2336/*
2337 * Handle the last reference to a file being closed.
2338 */
2339int
2340_fdrop(struct file *fp, struct thread *td)
2341{

--- 1103 unchanged lines hidden ---
2338}
2339
2340/*
2341 * Handle the last reference to a file being closed.
2342 */
2343int
2344_fdrop(struct file *fp, struct thread *td)
2345{

--- 1103 unchanged lines hidden ---