close file in a way that it does not trigger an assertion :-)

now zpool create works again.
This commit is contained in:
christos 2011-11-21 00:24:24 +00:00
parent 17877341be
commit 6a2b307489

View File

@ -179,8 +179,7 @@ spa_config_write(spa_config_dirent_t *dp, nvlist_t *nvl)
VOP_FSYNC(vp, FSYNC, kcred, NULL) == 0) {
(void) vn_rename(temp, dp->scd_path, UIO_SYSSPACE);
}
(void) VOP_CLOSE(vp, oflags, 1, 0, kcred, NULL);
VN_RELE(vp);
vn_close(vp, FWRITE, kcred);
}
(void) vn_remove(temp, UIO_SYSSPACE, RMFILE);