Subject: Re: kern/32986
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Jeff Ito <jeffito@speakeasy.net>
List: netbsd-bugs
Date: 03/20/2006 19:25:02
The following reply was made to PR kern/32986; it has been noted by GNATS.
From: Jeff Ito <jeffito@speakeasy.net>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: kern/32986
Date: Mon, 20 Mar 2006 14:24:55 -0500
I've come up with this diff based on FreeBSD code, it rectifies the
problem for me:
Index: union_vfsops.c
===================================================================
RCS file: /export/cvs/netbsd/src/sys/fs/union/union_vfsops.c,v
retrieving revision 1.32
diff -u -r1.32 union_vfsops.c
--- union_vfsops.c 5 Jan 2006 20:31:33 -0000 1.32
+++ union_vfsops.c 20 Mar 2006 19:20:18 -0000
@@ -337,6 +337,7 @@
{
struct union_mount *um = MOUNTTOUNIONMOUNT(mp);
int freeing;
+ int error;
#ifdef UNION_DIAGNOSTIC
printf("union_unmount(mp = %p)\n", mp);
@@ -351,7 +352,7 @@
* (d) times, where (d) is the maximum tree depth
* in the filesystem.
*/
- for (freeing = 0; vflush(mp, NULL, 0) != 0;) {
+ for (freeing = 0; (error = vflush(mp, NULL, 0)) != 0;) {
struct vnode *vp;
int n;
@@ -374,8 +375,10 @@
*/
if (mntflags & MNT_FORCE)
- vflush(mp, NULL, FORCECLOSE);
+ error = vflush(mp, NULL, FORCECLOSE);
+ if (error)
+ return (error);
/*
* Discard references to upper and lower target vnodes.