Lines Matching refs:sfh
880 argop[0].nfs_argop4_u.opcputfh.sfh = rp->r_fh; in nfs4_getattr_otw_norecovery()
992 argop[0].nfs_argop4_u.opcputfh.sfh = VTOR4(vp)->r_fh; in nfs4_attr_otw()
3718 nfs4_sharedfh_t *sfh, *nsfh; in sfh4_put() local
3744 sfh = avl_find(&mi->mi_filehandles, key, &where); in sfh4_put()
3745 if (sfh != NULL) { in sfh4_put()
3746 mutex_enter(&sfh->sfh_lock); in sfh4_put()
3747 sfh->sfh_refcnt++; in sfh4_put()
3748 mutex_exit(&sfh->sfh_lock); in sfh4_put()
3753 return (sfh); in sfh4_put()
3770 nfs4_sharedfh_t *sfh; in sfh4_get() local
3795 sfh = avl_find(&mi->mi_filehandles, &key, NULL); in sfh4_get()
3796 if (sfh != NULL) { in sfh4_get()
3797 mutex_enter(&sfh->sfh_lock); in sfh4_get()
3798 sfh->sfh_refcnt++; in sfh4_get()
3801 (void *)sfh, sfh->sfh_refcnt)); in sfh4_get()
3802 mutex_exit(&sfh->sfh_lock); in sfh4_get()
3804 return (sfh); in sfh4_get()
3816 sfh4_hold(nfs4_sharedfh_t *sfh) in sfh4_hold() argument
3818 ASSERT(sfh->sfh_refcnt > 0); in sfh4_hold()
3820 mutex_enter(&sfh->sfh_lock); in sfh4_hold()
3821 sfh->sfh_refcnt++; in sfh4_hold()
3824 (void *)sfh, sfh->sfh_refcnt)); in sfh4_hold()
3825 mutex_exit(&sfh->sfh_lock); in sfh4_hold()
3837 nfs4_sharedfh_t *sfh = *sfhpp; in sfh4_rele() local
3839 ASSERT(sfh->sfh_refcnt > 0); in sfh4_rele()
3841 mutex_enter(&sfh->sfh_lock); in sfh4_rele()
3842 if (sfh->sfh_refcnt > 1) { in sfh4_rele()
3843 sfh->sfh_refcnt--; in sfh4_rele()
3846 (void *)sfh, sfh->sfh_refcnt)); in sfh4_rele()
3847 mutex_exit(&sfh->sfh_lock); in sfh4_rele()
3850 mutex_exit(&sfh->sfh_lock); in sfh4_rele()
3856 mi = sfh->sfh_mi; in sfh4_rele()
3858 mutex_enter(&sfh->sfh_lock); in sfh4_rele()
3859 sfh->sfh_refcnt--; in sfh4_rele()
3860 if (sfh->sfh_refcnt > 0) { in sfh4_rele()
3863 (void *)sfh, sfh->sfh_refcnt)); in sfh4_rele()
3864 mutex_exit(&sfh->sfh_lock); in sfh4_rele()
3870 "sfh4_rele %p, last ref", (void *)sfh)); in sfh4_rele()
3871 if (sfh->sfh_flags & SFH4_IN_TREE) { in sfh4_rele()
3872 avl_remove(&mi->mi_filehandles, sfh); in sfh4_rele()
3873 sfh->sfh_flags &= ~SFH4_IN_TREE; in sfh4_rele()
3875 mutex_exit(&sfh->sfh_lock); in sfh4_rele()
3877 mutex_destroy(&sfh->sfh_lock); in sfh4_rele()
3878 kmem_free(sfh->sfh_fh.nfs_fh4_val, NFS4_FHSIZE); in sfh4_rele()
3879 kmem_free(sfh, sizeof (nfs4_sharedfh_t)); in sfh4_rele()
3892 sfh4_update(nfs4_sharedfh_t *sfh, const nfs_fh4 *newfh) in sfh4_update() argument
3894 mntinfo4_t *mi = sfh->sfh_mi; in sfh4_update()
3900 mutex_enter(&sfh->sfh_lock); in sfh4_update()
3901 ASSERT(sfh->sfh_refcnt > 0); in sfh4_update()
3902 mutex_exit(&sfh->sfh_lock); in sfh4_update()
3913 mutex_enter(&sfh->sfh_lock); in sfh4_update()
3914 if (sfh->sfh_flags & SFH4_IN_TREE) { in sfh4_update()
3915 avl_remove(&mi->mi_filehandles, sfh); in sfh4_update()
3916 sfh->sfh_flags &= ~SFH4_IN_TREE; in sfh4_update()
3918 mutex_exit(&sfh->sfh_lock); in sfh4_update()
3919 sfh->sfh_fh.nfs_fh4_len = newfh->nfs_fh4_len; in sfh4_update()
3920 bcopy(newfh->nfs_fh4_val, sfh->sfh_fh.nfs_fh4_val, in sfh4_update()
3921 sfh->sfh_fh.nfs_fh4_len); in sfh4_update()
3941 avl_insert(&mi->mi_filehandles, sfh, where); in sfh4_update()
3942 mutex_enter(&sfh->sfh_lock); in sfh4_update()
3943 sfh->sfh_flags |= SFH4_IN_TREE; in sfh4_update()
3944 mutex_exit(&sfh->sfh_lock); in sfh4_update()
3954 sfh4_copyval(const nfs4_sharedfh_t *sfh, nfs4_fhandle_t *fhp) in sfh4_copyval() argument
3956 mntinfo4_t *mi = sfh->sfh_mi; in sfh4_copyval()
3958 ASSERT(sfh->sfh_refcnt > 0); in sfh4_copyval()
3961 fhp->fh_len = sfh->sfh_fh.nfs_fh4_len; in sfh4_copyval()
3963 bcopy(sfh->sfh_fh.nfs_fh4_val, fhp->fh_buf, fhp->fh_len); in sfh4_copyval()
3972 sfh4_printfhandle(const nfs4_sharedfh_t *sfh) in sfh4_printfhandle() argument
3976 sfh4_copyval(sfh, &fhandle); in sfh4_printfhandle()
4013 fn_get(nfs4_fname_t *parent, char *name, nfs4_sharedfh_t *sfh) in fn_get() argument
4040 if (fnp->fn_sfh == sfh) { in fn_get()
4088 sfh4_hold(sfh); in fn_get()
4089 fnp->fn_sfh = sfh; in fn_get()