diff options
Diffstat (limited to 'module/zfs/vdev_file.c')
-rw-r--r-- | module/zfs/vdev_file.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/module/zfs/vdev_file.c b/module/zfs/vdev_file.c index dc0e920bf..f91dddbe5 100644 --- a/module/zfs/vdev_file.c +++ b/module/zfs/vdev_file.c @@ -61,7 +61,7 @@ vdev_file_open(vdev_t *vd, uint64_t *psize, uint64_t *ashift) */ ASSERT(vd->vdev_path != NULL && vd->vdev_path[0] == '/'); error = vn_openat(vd->vdev_path + 1, UIO_SYSSPACE, - spa_mode | FOFFMAX, 0, &vp, 0, 0, rootdir, -1); + spa_mode(vd->vdev_spa) | FOFFMAX, 0, &vp, 0, 0, rootdir, -1); if (error) { vd->vdev_stat.vs_aux = VDEV_AUX_OPEN_FAILED; @@ -105,7 +105,8 @@ vdev_file_close(vdev_t *vd) if (vf->vf_vnode != NULL) { (void) VOP_PUTPAGE(vf->vf_vnode, 0, 0, B_INVAL, kcred, NULL); - (void) VOP_CLOSE(vf->vf_vnode, spa_mode, 1, 0, kcred, NULL); + (void) VOP_CLOSE(vf->vf_vnode, spa_mode(vd->vdev_spa), 1, 0, + kcred, NULL); VN_RELE(vf->vf_vnode); } |