mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Abstract away platform specific superblock references
The zfsvfs->z_sb field is Linux specified and should be abstracted. Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9697
This commit is contained in:
committed by
Brian Behlendorf
parent
7bda69a1a9
commit
362ae8d11f
@@ -1442,8 +1442,8 @@ zfsvfs_rele(zfsvfs_t *zfsvfs, void *tag)
|
||||
{
|
||||
rrm_exit(&zfsvfs->z_teardown_lock, tag);
|
||||
|
||||
if (zfsvfs->z_sb) {
|
||||
deactivate_super(zfsvfs->z_sb);
|
||||
if (zfs_vfs_held(zfsvfs)) {
|
||||
zfs_vfs_rele(zfsvfs);
|
||||
} else {
|
||||
dmu_objset_disown(zfsvfs->z_os, B_TRUE, zfsvfs);
|
||||
zfsvfs_free(zfsvfs);
|
||||
@@ -4133,7 +4133,7 @@ zfs_ioc_rollback(const char *fsname, nvlist_t *innvl, nvlist_t *outnvl)
|
||||
resume_err = zfs_resume_fs(zfsvfs, ds);
|
||||
error = error ? error : resume_err;
|
||||
}
|
||||
deactivate_super(zfsvfs->z_sb);
|
||||
zfs_vfs_rele(zfsvfs);
|
||||
} else if ((zv = zvol_suspend(fsname)) != NULL) {
|
||||
error = dsl_dataset_rollback(fsname, target, zvol_tag(zv),
|
||||
outnvl);
|
||||
@@ -4866,7 +4866,7 @@ zfs_ioc_recv_impl(char *tofs, char *tosnap, char *origin, nvlist_t *recvprops,
|
||||
error = zfs_resume_fs(zfsvfs, ds);
|
||||
}
|
||||
error = error ? error : end_err;
|
||||
deactivate_super(zfsvfs->z_sb);
|
||||
zfs_vfs_rele(zfsvfs);
|
||||
} else if ((zv = zvol_suspend(tofs)) != NULL) {
|
||||
error = dmu_recv_end(&drc, zvol_tag(zv));
|
||||
zvol_resume(zv);
|
||||
@@ -5784,7 +5784,7 @@ zfs_ioc_userspace_upgrade(zfs_cmd_t *zc)
|
||||
}
|
||||
if (error == 0)
|
||||
error = dmu_objset_userspace_upgrade(zfsvfs->z_os);
|
||||
deactivate_super(zfsvfs->z_sb);
|
||||
zfs_vfs_rele(zfsvfs);
|
||||
} else {
|
||||
/* XXX kind of reading contents without owning */
|
||||
error = dmu_objset_hold_flags(zc->zc_name, B_TRUE, FTAG, &os);
|
||||
|
||||
Reference in New Issue
Block a user