git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Linux 3.8 compat: Support CONFIG_UIDGID_STRICT_TYPE_CHECKS
[zfs.git]
/
module
/
zfs
/
zfs_vfsops.c
diff --git
a/module/zfs/zfs_vfsops.c
b/module/zfs/zfs_vfsops.c
index
e618f2b
..
9ae7ab5
100644
(file)
--- a/
module/zfs/zfs_vfsops.c
+++ b/
module/zfs/zfs_vfsops.c
@@
-233,10
+233,11
@@
zfs_register_callbacks(zfs_sb_t *zsb)
{
struct dsl_dataset *ds = NULL;
objset_t *os = zsb->z_os;
{
struct dsl_dataset *ds = NULL;
objset_t *os = zsb->z_os;
+ boolean_t do_readonly = B_FALSE;
int error = 0;
if (zfs_is_readonly(zsb) || !spa_writeable(dmu_objset_spa(os)))
int error = 0;
if (zfs_is_readonly(zsb) || !spa_writeable(dmu_objset_spa(os)))
-
readonly_changed_cb(zsb, B_TRUE)
;
+
do_readonly = B_TRUE
;
/*
* Register property callbacks.
/*
* Register property callbacks.
@@
-271,6
+272,9
@@
zfs_register_callbacks(zfs_sb_t *zsb)
if (error)
goto unregister;
if (error)
goto unregister;
+ if (do_readonly)
+ readonly_changed_cb(zsb, B_TRUE);
+
return (0);
unregister:
return (0);
unregister:
@@
-1056,10
+1060,12
@@
zfs_sb_teardown(zfs_sb_t *zsb, boolean_t unmounting)
}
/*
}
/*
- * Drain the iput_taskq to ensure all active references to the
+ * If someone has not already unmounted this file system,
+ * drain the iput_taskq to ensure all active references to the
* zfs_sb_t have been handled only then can it be safely destroyed.
*/
* zfs_sb_t have been handled only then can it be safely destroyed.
*/
- taskq_wait(dsl_pool_iput_taskq(dmu_objset_pool(zsb->z_os)));
+ if (zsb->z_os)
+ taskq_wait(dsl_pool_iput_taskq(dmu_objset_pool(zsb->z_os)));
/*
* Close the zil. NB: Can't close the zil while zfs_inactive
/*
* Close the zil. NB: Can't close the zil while zfs_inactive
@@
-1480,10
+1486,11
@@
bail:
if (err) {
/*
if (err) {
/*
- * Since we couldn't reopen zfs_sb_t
, forc
e
- * unmount this file system.
+ * Since we couldn't reopen zfs_sb_t
or, setup th
e
+ *
sa framework, force
unmount this file system.
*/
*/
- (void) zfs_umount(zsb->z_sb);
+ if (zsb->z_os)
+ (void) zfs_umount(zsb->z_sb);
}
return (err);
}
}
return (err);
}