Fix reference count leak for a case where snapshot's mount point is updated.
Such situation is not supported. This problem was triggered by something like this: # zpool create tank da0 # zfs snapshot tank@snap # cd /tank/.zfs/snapshot/snap (this will mount the snapshot) # cd # mount -u nosuid /tank/.zfs/snapshot/snap (refcount leak) # zpool export tank cannot export 'tank': pool is busy MFC after: 1 week
This commit is contained in:
parent
676cac231c
commit
7faac77b19
@ -336,6 +336,13 @@ zfs_register_callbacks(vfs_t *vfsp)
|
||||
ASSERT(zfsvfs);
|
||||
os = zfsvfs->z_os;
|
||||
|
||||
/*
|
||||
* This function can be called for a snapshot when we update snapshot's
|
||||
* mount point, which isn't really supported.
|
||||
*/
|
||||
if (dmu_objset_is_snapshot(os))
|
||||
return (EOPNOTSUPP);
|
||||
|
||||
/*
|
||||
* The act of registering our callbacks will destroy any mount
|
||||
* options we may have. In order to enable temporary overrides
|
||||
|
Loading…
Reference in New Issue
Block a user