Lines Matching refs:tm

233 	struct tmount *tm = NULL;  in tmp_mount()  local
300 tm = (struct tmount *)VFSTOTM(vfsp); in tmp_mount()
308 mutex_enter(&tm->tm_contents); in tmp_mount()
309 tm->tm_anonmax = anonmax; in tmp_mount()
310 mutex_exit(&tm->tm_contents); in tmp_mount()
314 if ((tm = tmp_memalloc(sizeof (struct tmount), 0)) == NULL) { in tmp_mount()
326 tm->tm_dev = makedevice(tmpfs_major, tmpfs_minor); in tmp_mount()
327 } while (vfs_devismounted(tm->tm_dev)); in tmp_mount()
334 mutex_init(&tm->tm_contents, NULL, MUTEX_DEFAULT, NULL); in tmp_mount()
335 mutex_init(&tm->tm_renamelck, NULL, MUTEX_DEFAULT, NULL); in tmp_mount()
337 tm->tm_vfsp = vfsp; in tmp_mount()
338 tm->tm_anonmax = anonmax; in tmp_mount()
340 vfsp->vfs_data = (caddr_t)tm; in tmp_mount()
342 vfsp->vfs_dev = tm->tm_dev; in tmp_mount()
345 vfs_make_fsid(&vfsp->vfs_fsid, tm->tm_dev, tmpfsfstype); in tmp_mount()
346 tm->tm_mntpath = tmp_memalloc(dpn.pn_pathlen + 1, TMP_MUSTHAVE); in tmp_mount()
347 (void) strcpy(tm->tm_mntpath, dpn.pn_path); in tmp_mount()
357 tmpnode_init(tm, tp, &rattr, cr); in tmp_mount()
393 tm->tm_rootnode = tp; in tmp_mount()
412 struct tmount *tm = (struct tmount *)VFSTOTM(vfsp); in tmp_unmount() local
427 mutex_enter(&tm->tm_contents); in tmp_unmount()
438 tnp = tm->tm_rootnode; in tmp_unmount()
440 mutex_exit(&tm->tm_contents); in tmp_unmount()
446 cancel = tm->tm_rootnode->tn_forw; in tmp_unmount()
453 mutex_exit(&tm->tm_contents); in tmp_unmount()
462 mutex_exit(&tm->tm_contents); in tmp_unmount()
475 for (tnp = tm->tm_rootnode; tnp; tnp = tnp->tn_forw) { in tmp_unmount()
489 ASSERT(tm->tm_rootnode); in tmp_unmount()
502 mutex_enter(&tm->tm_contents); in tmp_unmount()
506 while ((tnp = tm->tm_rootnode->tn_back) != tm->tm_rootnode) { in tmp_unmount()
507 mutex_exit(&tm->tm_contents); in tmp_unmount()
518 mutex_enter(&tm->tm_contents); in tmp_unmount()
524 if (tnp == tm->tm_rootnode->tn_back) { in tmp_unmount()
526 mutex_exit(&tm->tm_contents); in tmp_unmount()
528 mutex_enter(&tm->tm_contents); in tmp_unmount()
531 mutex_exit(&tm->tm_contents); in tmp_unmount()
533 tm->tm_rootnode->tn_xattrdp = NULL; in tmp_unmount()
534 VN_RELE(TNTOV(tm->tm_rootnode)); in tmp_unmount()
536 ASSERT(tm->tm_mntpath); in tmp_unmount()
538 tmp_memfree(tm->tm_mntpath, strlen(tm->tm_mntpath) + 1); in tmp_unmount()
540 ASSERT(tm->tm_anonmem == 0); in tmp_unmount()
542 mutex_destroy(&tm->tm_contents); in tmp_unmount()
543 mutex_destroy(&tm->tm_renamelck); in tmp_unmount()
544 tmp_memfree(tm, sizeof (struct tmount)); in tmp_unmount()
555 struct tmount *tm = (struct tmount *)VFSTOTM(vfsp); in tmp_root() local
556 struct tmpnode *tp = tm->tm_rootnode; in tmp_root()
570 struct tmount *tm = (struct tmount *)VFSTOTM(vfsp); in tmp_statvfs() local
586 zp = tm->tm_vfsp->vfs_zone; in tmp_statvfs()
610 tm->tm_anonmax - tm->tm_anonmem); in tmp_statvfs()
619 sbp->f_blocks = (fsblkcnt64_t)(sbp->f_bfree + tm->tm_anonmem); in tmp_statvfs()
661 (void) strncpy(sbp->f_fstr, tm->tm_mntpath, sizeof (sbp->f_fstr)); in tmp_statvfs()
675 struct tmount *tm = (struct tmount *)VFSTOTM(vfsp); in tmp_vget() local
681 mutex_enter(&tm->tm_contents); in tmp_vget()
682 for (tp = tm->tm_rootnode; tp; tp = tp->tn_forw) { in tmp_vget()
692 mutex_exit(&tm->tm_contents); in tmp_vget()
706 mutex_exit(&tm->tm_contents); in tmp_vget()
711 mutex_exit(&tm->tm_contents); in tmp_vget()