PERFORCE change 109935 for review
Todd Miller
millert at FreeBSD.org
Tue Nov 14 16:24:58 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=109935
Change 109935 by millert at millert_g5tower on 2006/11/14 16:11:20
In vfs_mountroot() failure of VFS_ROOT() and vnode_label()
should result in filesystem being unmounted.
Affected files ...
.. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_subr.c#7 edit
Differences ...
==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_subr.c#7 (text+ko) ====
@@ -951,16 +951,24 @@
error = VFS_ROOT(mp, &vp, &context);
if (error) {
- printf("%s() VFS_ROOT returned %d\n",
+ printf("%s() VFS_ROOT() returned %d\n",
__func__, error);
- return (error);
+ dounmount(mp, MNT_FORCE, context.vc_proc);
+ goto fail;
}
/* VFS_ROOT provides reference so flags = 0 */
error = vnode_label(mp, NULL, vp, NULL, 0, &context);
+ if (error) {
+ printf("%s() vnode_label() returned %d\n",
+ __func__, error);
+ dounmount(mp, MNT_FORCE, context.vc_proc);
+ goto fail;
+ }
#endif
- return (error);
+ return (0);
}
+fail:
vfs_rootmountfailed(mp);
if (error != EINVAL)
More information about the trustedbsd-cvs
mailing list