Lines Matching full:np

89 	struct smbnode *np;  in smbfs_vnode_cmp()  local
92 np = (struct smbnode *) vp->v_data; in smbfs_vnode_cmp()
94 if (np->n_parent != sc->n_parent || np->n_nmlen != sc->n_nmlen || in smbfs_vnode_cmp()
95 bcmp(sc->n_name, np->n_name, sc->n_nmlen) != 0) in smbfs_vnode_cmp()
108 struct smbnode *np, *dnp; in smbfs_node_alloc() local
143 np = VTOSMB(*vpp); in smbfs_node_alloc()
153 (np->n_dosattr & SMB_FA_DIR) == 0) || in smbfs_node_alloc()
155 (np->n_dosattr & SMB_FA_DIR) != 0)) { in smbfs_node_alloc()
175 np = malloc(sizeof *np, M_SMBNODE, M_WAITOK | M_ZERO); in smbfs_node_alloc()
195 vp->v_data = np; in smbfs_node_alloc()
196 np->n_vnode = vp; in smbfs_node_alloc()
197 np->n_mount = VFSTOSMBFS(mp); in smbfs_node_alloc()
198 np->n_rpath = rpath; in smbfs_node_alloc()
199 np->n_rplen = rplen; in smbfs_node_alloc()
200 np->n_nmlen = nmlen; in smbfs_node_alloc()
201 np->n_name = smbfs_name_alloc(name, nmlen); in smbfs_node_alloc()
202 np->n_ino = fap->fa_ino; in smbfs_node_alloc()
205 np->n_parent = dvp; in smbfs_node_alloc()
206 np->n_parentino = VTOSMB(dvp)->n_ino; in smbfs_node_alloc()
209 np->n_flag |= NREFPARENT; in smbfs_node_alloc()
212 SMBERROR("new vnode '%s' born without parent ?\n", np->n_name); in smbfs_node_alloc()
215 free(np, M_SMBNODE); in smbfs_node_alloc()
262 struct smbnode *np = VTOSMB(vp); in smbfs_reclaim() local
265 SMBVDEBUG("%s,%d\n", np->n_name, vrefcnt(vp)); in smbfs_reclaim()
267 KASSERT((np->n_flag & NOPEN) == 0, ("file not closed before reclaim")); in smbfs_reclaim()
269 dvp = (np->n_parent && (np->n_flag & NREFPARENT)) ? in smbfs_reclaim()
270 np->n_parent : NULL; in smbfs_reclaim()
276 if (np->n_name) in smbfs_reclaim()
277 smbfs_name_free(np->n_name); in smbfs_reclaim()
278 if (np->n_rpath) in smbfs_reclaim()
279 free(np->n_rpath, M_SMBNODENAME); in smbfs_reclaim()
280 free(np, M_SMBNODE); in smbfs_reclaim()
299 struct smbnode *np = VTOSMB(vp); in smbfs_inactive() local
304 if ((np->n_flag & NOPEN) != 0) { in smbfs_inactive()
310 smbfs_smb_close(np->n_mount->sm_share, np->n_fid, in smbfs_inactive()
311 &np->n_mtime, scred); in smbfs_inactive()
313 if (np->n_dirseq != NULL) { in smbfs_inactive()
314 smbfs_findclose(np->n_dirseq, scred); in smbfs_inactive()
315 np->n_dirseq = NULL; in smbfs_inactive()
318 np->n_flag &= ~NOPEN; in smbfs_inactive()
322 if (np->n_flag & NGONE) in smbfs_inactive()
328 * smbfs_attr_cacheenter: unpack np.i to vattr structure
333 struct smbnode *np = VTOSMB(vp); in smbfs_attr_cacheenter() local
336 if (np->n_size != fap->fa_size) { in smbfs_attr_cacheenter()
337 np->n_size = fap->fa_size; in smbfs_attr_cacheenter()
338 vnode_pager_setsize(vp, np->n_size); in smbfs_attr_cacheenter()
341 np->n_size = 16384; /* should be a better way ... */ in smbfs_attr_cacheenter()
344 np->n_mtime = fap->fa_mtime; in smbfs_attr_cacheenter()
345 np->n_dosattr = fap->fa_attr; in smbfs_attr_cacheenter()
346 np->n_attrage = time_second; in smbfs_attr_cacheenter()
353 struct smbnode *np = VTOSMB(vp); in smbfs_attr_cachelookup() local
357 diff = time_second - np->n_attrage; in smbfs_attr_cachelookup()
364 if (np->n_dosattr & SMB_FA_RDONLY) { in smbfs_attr_cachelookup()
372 va->va_size = np->n_size; in smbfs_attr_cachelookup()
377 va->va_fileid = np->n_ino; /* file id */ in smbfs_attr_cachelookup()
381 va->va_mtime = np->n_mtime; in smbfs_attr_cachelookup()
384 if (np->n_dosattr & SMB_FA_HIDDEN) in smbfs_attr_cachelookup()
386 if (np->n_dosattr & SMB_FA_SYSTEM) in smbfs_attr_cachelookup()
391 if ((vp->v_type != VDIR) && (np->n_dosattr & SMB_FA_ARCHIVE)) in smbfs_attr_cachelookup()