summaryrefslogtreecommitdiffstats
path: root/sys/fs/fdescfs
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-01-14 00:13:45 +0000
committeralfred <alfred@FreeBSD.org>2002-01-14 00:13:45 +0000
commit1f82bc18d1d1e906cd9ed68039acb051fa6e11cf (patch)
treefe7842143c9585ef2ebb793d812ec71cc4488a51 /sys/fs/fdescfs
parentc4988e25d265bba2c63409a8c8b8708c13d8525e (diff)
downloadFreeBSD-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/fs/fdescfs')
-rw-r--r--sys/fs/fdescfs/fdesc_vnops.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/fs/fdescfs/fdesc_vnops.c b/sys/fs/fdescfs/fdesc_vnops.c
index 3326375..d3b6bda 100644
--- a/sys/fs/fdescfs/fdesc_vnops.c
+++ b/sys/fs/fdescfs/fdesc_vnops.c
@@ -213,11 +213,8 @@ fdesc_lookup(ap)
fd = 10 * fd + *pname++ - '0';
}
- fp = ffind_hold(td, fd);
- if (fp == NULL) {
- error = EBADF;
+ if ((error = fget(td, fd, &fp)) != 0)
goto bad;
- }
error = fdesc_allocvp(Fdesc, FD_DESC+fd, dvp->v_mount, &fvp, td);
fdrop(fp, td);
@@ -301,9 +298,8 @@ fdesc_getattr(ap)
case Fdesc:
fd = VTOFDESC(vp)->fd_fd;
- fp = ffind_hold(ap->a_td, fd);
- if (fp == NULL)
- return (EBADF);
+ if ((error = fget(ap->a_td, fd, &fp)) != 0)
+ return (error);
bzero(&stb, sizeof(stb));
error = fo_stat(fp, &stb, ap->a_td);
OpenPOWER on IntegriCloud