Purge namecache in the same place OpenSolaris does.
This commit is contained in:
parent
5c84347532
commit
c4be11d7fc
@ -2354,9 +2354,6 @@ zfs_ioc_rollback(zfs_cmd_t *zc)
|
||||
if (error == 0) {
|
||||
int resume_err;
|
||||
|
||||
#ifdef FREEBSD_NAMECACHE
|
||||
cache_purgevfs(zfsvfs->z_vfs);
|
||||
#endif
|
||||
ASSERT(strcmp(osname, zc->zc_name) == 0);
|
||||
error = dmu_objset_rollback(os);
|
||||
resume_err = zfs_resume_fs(zfsvfs, osname, mode);
|
||||
@ -2543,9 +2540,6 @@ zfs_ioc_recv(zfs_cmd_t *zc)
|
||||
if (error == 0) {
|
||||
int resume_err;
|
||||
|
||||
#ifdef FREEBSD_NAMECACHE
|
||||
cache_purgevfs(zfsvfs->z_vfs);
|
||||
#endif
|
||||
error = dmu_recv_end(&drc);
|
||||
resume_err = zfs_resume_fs(zfsvfs, osname, mode);
|
||||
error = error ? error : resume_err;
|
||||
|
@ -898,6 +898,9 @@ zfsvfs_teardown(zfsvfs_t *zfsvfs, boolean_t unmounting)
|
||||
* 'z_parent' is self referential for non-snapshots.
|
||||
*/
|
||||
(void) dnlc_purge_vfsp(zfsvfs->z_parent->z_vfs, 0);
|
||||
#ifdef FREEBSD_NAMECACHE
|
||||
cache_purgevfs(zfsvfs->z_parent->z_vfs);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user