Purge namecache in the same place OpenSolaris does.

This commit is contained in:
Pawel Jakub Dawidek 2009-09-20 13:28:29 +00:00
parent 5c84347532
commit c4be11d7fc
2 changed files with 3 additions and 6 deletions

View File

@ -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;

View File

@ -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
}
/*