Lines Matching refs:tm

234 	struct tmount *tm = NULL;  in tmp_mount()  local
301 tm = (struct tmount *)VFSTOTM(vfsp); in tmp_mount()
309 mutex_enter(&tm->tm_contents); in tmp_mount()
310 tm->tm_anonmax = anonmax; in tmp_mount()
311 mutex_exit(&tm->tm_contents); in tmp_mount()
315 if ((tm = tmp_memalloc(sizeof (struct tmount), 0)) == NULL) { in tmp_mount()
327 tm->tm_dev = makedevice(tmpfs_major, tmpfs_minor); in tmp_mount()
328 } while (vfs_devismounted(tm->tm_dev)); in tmp_mount()
335 mutex_init(&tm->tm_contents, NULL, MUTEX_DEFAULT, NULL); in tmp_mount()
336 mutex_init(&tm->tm_renamelck, NULL, MUTEX_DEFAULT, NULL); in tmp_mount()
338 tm->tm_vfsp = vfsp; in tmp_mount()
339 tm->tm_anonmax = anonmax; in tmp_mount()
341 vfsp->vfs_data = (caddr_t)tm; in tmp_mount()
343 vfsp->vfs_dev = tm->tm_dev; in tmp_mount()
346 vfs_make_fsid(&vfsp->vfs_fsid, tm->tm_dev, tmpfsfstype); in tmp_mount()
347 tm->tm_mntpath = tmp_memalloc(dpn.pn_pathlen + 1, TMP_MUSTHAVE); in tmp_mount()
348 (void) strcpy(tm->tm_mntpath, dpn.pn_path); in tmp_mount()
358 tmpnode_init(tm, tp, &rattr, cr); in tmp_mount()
394 tm->tm_rootnode = tp; in tmp_mount()
413 struct tmount *tm = (struct tmount *)VFSTOTM(vfsp); in tmp_unmount() local
428 mutex_enter(&tm->tm_contents); in tmp_unmount()
439 tnp = tm->tm_rootnode; in tmp_unmount()
441 mutex_exit(&tm->tm_contents); in tmp_unmount()
447 cancel = tm->tm_rootnode->tn_forw; in tmp_unmount()
454 mutex_exit(&tm->tm_contents); in tmp_unmount()
463 mutex_exit(&tm->tm_contents); in tmp_unmount()
476 for (tnp = tm->tm_rootnode; tnp; tnp = tnp->tn_forw) { in tmp_unmount()
490 ASSERT(tm->tm_rootnode); in tmp_unmount()
503 mutex_enter(&tm->tm_contents); in tmp_unmount()
507 while ((tnp = tm->tm_rootnode->tn_back) != tm->tm_rootnode) { in tmp_unmount()
508 mutex_exit(&tm->tm_contents); in tmp_unmount()
519 mutex_enter(&tm->tm_contents); in tmp_unmount()
525 if (tnp == tm->tm_rootnode->tn_back) { in tmp_unmount()
527 mutex_exit(&tm->tm_contents); in tmp_unmount()
529 mutex_enter(&tm->tm_contents); in tmp_unmount()
532 mutex_exit(&tm->tm_contents); in tmp_unmount()
534 tm->tm_rootnode->tn_xattrdp = NULL; in tmp_unmount()
535 VN_RELE(TNTOV(tm->tm_rootnode)); in tmp_unmount()
537 ASSERT(tm->tm_mntpath); in tmp_unmount()
539 tmp_memfree(tm->tm_mntpath, strlen(tm->tm_mntpath) + 1); in tmp_unmount()
541 ASSERT(tm->tm_anonmem == 0); in tmp_unmount()
543 mutex_destroy(&tm->tm_contents); in tmp_unmount()
544 mutex_destroy(&tm->tm_renamelck); in tmp_unmount()
545 tmp_memfree(tm, sizeof (struct tmount)); in tmp_unmount()
556 struct tmount *tm = (struct tmount *)VFSTOTM(vfsp); in tmp_root() local
557 struct tmpnode *tp = tm->tm_rootnode; in tmp_root()
571 struct tmount *tm = (struct tmount *)VFSTOTM(vfsp); in tmp_statvfs() local
587 zp = tm->tm_vfsp->vfs_zone; in tmp_statvfs()
611 tm->tm_anonmax - tm->tm_anonmem); in tmp_statvfs()
620 sbp->f_blocks = (fsblkcnt64_t)(sbp->f_bfree + tm->tm_anonmem); in tmp_statvfs()
662 (void) strncpy(sbp->f_fstr, tm->tm_mntpath, sizeof (sbp->f_fstr)); in tmp_statvfs()
676 struct tmount *tm = (struct tmount *)VFSTOTM(vfsp); in tmp_vget() local
682 mutex_enter(&tm->tm_contents); in tmp_vget()
683 for (tp = tm->tm_rootnode; tp; tp = tp->tn_forw) { in tmp_vget()
693 mutex_exit(&tm->tm_contents); in tmp_vget()
707 mutex_exit(&tm->tm_contents); in tmp_vget()
712 mutex_exit(&tm->tm_contents); in tmp_vget()