summaryrefslogtreecommitdiff
path: root/sys/kern/vfs_vnops.c
diff options
context:
space:
mode:
authorKirk McKusick <mckusick@FreeBSD.org>2001-04-25 08:11:18 +0000
committerKirk McKusick <mckusick@FreeBSD.org>2001-04-25 08:11:18 +0000
commit112f737245c52f3064ace38ba0330b6110643cba (patch)
tree426cf063565af6317b3b723bc81be1e49e9802fd /sys/kern/vfs_vnops.c
parente69b2bc11c2a03849fc99a92a4a000cc6ae05b02 (diff)
downloadsrc-test2-112f737245c52f3064ace38ba0330b6110643cba.tar.gz
src-test2-112f737245c52f3064ace38ba0330b6110643cba.zip
Notes
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r--sys/kern/vfs_vnops.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c
index 98da01a373fa..62407fee071f 100644
--- a/sys/kern/vfs_vnops.c
+++ b/sys/kern/vfs_vnops.c
@@ -235,6 +235,15 @@ vn_close(vp, flags, cred, p)
if (flags & FWRITE)
vp->v_writecount--;
error = VOP_CLOSE(vp, flags, cred, p);
+ /*
+ * XXX - In certain instances VOP_CLOSE has to do the vrele
+ * itself. If the vrele has been done, it will return EAGAIN
+ * to indicate that the vrele should not be done again. When
+ * this happens, we just return success. The correct thing to
+ * do would be to have all VOP_CLOSE instances do the vrele.
+ */
+ if (error == EAGAIN)
+ return (0);
vrele(vp);
return (error);
}