From 0e31aec87e545a4e3f3d51781361eab6b72da8ad Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Fri, 8 Feb 2002 13:53:29 +0000 Subject: - Rename FILE_{,UN}USE to FREF and FRELE. USE is a bad verb and we don't have the same semantics as NetBSD anyway, so it's good to avoid name collissions. - Always fdremove before freeing the file, not the other way around. - falloc FREFs the file. - have FILE_SET_MATURE FRELE the file (It feels like a good ortogonality to falloc FREFing the file). - Use closef as much as possible instead of ffree in error paths of falloc:ing functions. closef is much more careful with the fd and can deal with the fd being forcibly closed by dup2. Also try to avoid manually calling *fo_close when closef can do that for us (this makes some error paths mroe complicated (sys_socketpair and sys_pipe), but others become simpler (sys_open)). --- sys/miscfs/portal/portal_vfsops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/miscfs/portal') diff --git a/sys/miscfs/portal/portal_vfsops.c b/sys/miscfs/portal/portal_vfsops.c index 16d18417044..86187f81f98 100644 --- a/sys/miscfs/portal/portal_vfsops.c +++ b/sys/miscfs/portal/portal_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: portal_vfsops.c,v 1.10 2002/02/05 16:02:27 art Exp $ */ +/* $OpenBSD: portal_vfsops.c,v 1.11 2002/02/08 13:53:28 art Exp $ */ /* $NetBSD: portal_vfsops.c,v 1.14 1996/02/09 22:40:41 christos Exp $ */ /* @@ -187,7 +187,7 @@ portal_unmount(mp, mntflags, p) * daemon to wake up, and then the accept will get ECONNABORTED * which it interprets as a request to go and bury itself. */ - FILE_USE(VFSTOPORTAL(mp)->pm_server); + FREF(VFSTOPORTAL(mp)->pm_server); soshutdown((struct socket *) VFSTOPORTAL(mp)->pm_server->f_data, 2); /* * Discard reference to underlying file. Must call closef because -- cgit v1.2.3