Lines Matching refs:sht

106 	sharetab_t	*sht;  in sharefs_remove()  local
114 for (sht = sg->sharefs_sharetab; sht != NULL; sht = sht->s_next) { in sharefs_remove()
115 if (strcmp(sh->sh_fstype, sht->s_fstype) == 0) in sharefs_remove()
123 if (sht == NULL) { in sharefs_remove()
134 for (p = NULL, s = sht->s_buckets[iHash].ssh_sh; in sharefs_remove()
144 sht->s_buckets[iHash].ssh_sh = s->sh_next; in sharefs_remove()
146 ASSERT(sht->s_buckets[iHash].ssh_count != 0); in sharefs_remove()
147 atomic_dec_32(&sht->s_buckets[iHash].ssh_count); in sharefs_remove()
148 atomic_dec_32(&sht->s_count); in sharefs_remove()
184 sharetab_t *sht; in sharefs_add() local
194 for (sht = sg->sharefs_sharetab; sht != NULL; sht = sht->s_next) { in sharefs_add()
195 if (strcmp(sh->sh_fstype, sht->s_fstype) == 0) in sharefs_add()
200 if (sht == NULL) { in sharefs_add()
201 sht = kmem_zalloc(sizeof (*sht), KM_SLEEP); in sharefs_add()
203 sht->s_fstype = kmem_zalloc(n + 1, KM_SLEEP); in sharefs_add()
204 (void) strncpy(sht->s_fstype, sh->sh_fstype, n); in sharefs_add()
206 sht->s_next = sg->sharefs_sharetab; in sharefs_add()
207 sg->sharefs_sharetab = sht; in sharefs_add()
227 for (p = NULL, s = sht->s_buckets[iHash].ssh_sh; in sharefs_add()
241 sht->s_buckets[iHash].ssh_sh = sh; in sharefs_add()
255 ASSERT(sht->s_buckets[iHash].ssh_count != 0); in sharefs_add()
268 sh->sh_next = sht->s_buckets[iHash].ssh_sh; in sharefs_add()
269 sht->s_buckets[iHash].ssh_sh = sh; in sharefs_add()
270 atomic_inc_32(&sht->s_buckets[iHash].ssh_count); in sharefs_add()
271 atomic_inc_32(&sht->s_count); in sharefs_add()