View | Details | Raw Unified | Return to bug 251320
Collapse All | Expand All

(-)b/sys/kern/vfs_mount.c (+9 lines)
Lines 895-900 vfs_domount_first( Link Here
895
	    (error1 = VFS_ROOT(mp, LK_EXCLUSIVE, &newdp)) != 0) {
895
	    (error1 = VFS_ROOT(mp, LK_EXCLUSIVE, &newdp)) != 0) {
896
		if (error1 != 0) {
896
		if (error1 != 0) {
897
			error = error1;
897
			error = error1;
898
			/*
899
			 * if mounted as rw - we should increase mnt_writeopcount here
900
			 * since VFS_UNMOUNT will call vfs_write_suspend_umnt() and
901
			 * it expects a non-zero vfs_write_suspend_umnt
902
			 */
903
			if ((mp->mnt_flag & MNT_RDONLY) == 0) {
904
				if ((error = vn_start_write(NULL, &mp, V_WAIT)) != 0)
905
					return (error);
906
			}
898
			if ((error1 = VFS_UNMOUNT(mp, 0)) != 0)
907
			if ((error1 = VFS_UNMOUNT(mp, 0)) != 0)
899
				printf("VFS_UNMOUNT returned %d\n", error1);
908
				printf("VFS_UNMOUNT returned %d\n", error1);
900
		}
909
		}

Return to bug 251320