From a4db49537b0def4e1a63bb696ab51b7549fcdf23 Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Mon, 14 Jan 2002 00:13:45 +0000 Subject: Replace ffind_* with fget calls. Make fget MPsafe. Make fgetvp and fgetsock use the fget subsystem to reduce code bloat. Push giant down in fpathconf(). --- sys/netgraph/ng_socket.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/netgraph') diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c index 09ce2cf3d752..206d752ddd30 100644 --- a/sys/netgraph/ng_socket.c +++ b/sys/netgraph/ng_socket.c @@ -591,9 +591,8 @@ ng_internalize(struct mbuf *control, struct thread *td) /* Check that the FD given is legit. and change it to a pointer to a * struct file. */ fd = CMSG_DATA(cm); - fp = ffind_hold(td, fd); - if (fp == NULL) - return (EBADF); + if ((error = fget(td, fd, &fp)) != 0) + return (error); /* Depending on what kind of resource it is, act differently. For * devices, we treat it as a file. For a AF_NETGRAPH socket, -- cgit v1.3