diff options
author | alfred <alfred@FreeBSD.org> | 2002-01-14 00:13:45 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-01-14 00:13:45 +0000 |
commit | 1f82bc18d1d1e906cd9ed68039acb051fa6e11cf (patch) | |
tree | fe7842143c9585ef2ebb793d812ec71cc4488a51 /sys/netgraph | |
parent | c4988e25d265bba2c63409a8c8b8708c13d8525e (diff) | |
download | FreeBSD-src-1f82bc18d1d1e906cd9ed68039acb051fa6e11cf.zip FreeBSD-src-1f82bc18d1d1e906cd9ed68039acb051fa6e11cf.tar.gz |
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().
Diffstat (limited to 'sys/netgraph')
-rw-r--r-- | sys/netgraph/ng_socket.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/netgraph/ng_socket.c b/sys/netgraph/ng_socket.c index 09ce2cf..206d752 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, |