Lines Matching refs:cp
152 struct cnode *cp;
165 for (cp = CNODEHASH(hfsmp, inum)->lh_first; cp; cp = cp->c_hash.le_next) {
166 if (cp->c_fileid != inum)
169 if (ISSET(cp->c_hflag, H_ALLOC | H_TRANSIT | H_ATTACH)) {
170 SET(cp->c_hflag, H_WAITING);
172 (void) msleep(cp, &hfsmp->hfs_chash_mutex, PDROP | PINOD,
177 vp = wantrsrc ? cp->c_rsrc_vp : cp->c_vp;
191 if (!skiplock && hfs_lock(cp, HFS_EXCLUSIVE_LOCK) != 0) {
204 if (cp->c_flag & (C_NOEXISTS | C_DELETED)) {
206 hfs_unlock(cp);
232 struct cnode *cp;
242 for (cp = CNODEHASH(hfsmp, inum)->lh_first; cp; cp = cp->c_hash.le_next) {
243 if (cp->c_fileid != inum)
266 if (cp->c_flag & (C_NOEXISTS | C_DELETED)) {
270 if (!ISSET(cp->c_hflag, H_ALLOC | H_TRANSIT | H_ATTACH)) {
271 result = callout(&cp->c_desc, &cp->c_attr, arg);
300 struct cnode *cp;
314 for (cp = CNODEHASH(hfsmp, inum)->lh_first; cp; cp = cp->c_hash.le_next) {
315 if (cp->c_fileid != inum)
320 if (ISSET(cp->c_hflag, H_ALLOC | H_ATTACH | H_TRANSIT)) {
321 SET(cp->c_hflag, H_WAITING);
323 (void) msleep(cp, &hfsmp->hfs_chash_mutex, PINOD,
327 vp = wantrsrc ? cp->c_rsrc_vp : cp->c_vp;
332 SET(cp->c_hflag, H_ATTACH);
355 hfs_lock(cp, HFS_FORCE_LOCK);
368 if ((cp->c_flag & (C_NOEXISTS | C_DELETED)) && !wantrsrc) {
370 if (cp->c_flag & C_RENAMED) {
374 hfs_unlock(cp);
379 CLR(cp->c_hflag, H_ATTACH);
381 if (ISSET(cp->c_hflag, H_WAITING)) {
382 CLR(cp->c_hflag, H_WAITING);
383 wakeup((caddr_t)cp);
388 cp = NULL;
394 return (cp);
439 hfs_chashwakeup(struct hfsmount *hfsmp, struct cnode *cp, int hflags)
443 CLR(cp->c_hflag, hflags);
445 if (ISSET(cp->c_hflag, H_WAITING)) {
446 CLR(cp->c_hflag, H_WAITING);
447 wakeup((caddr_t)cp);
476 hfs_chashremove(struct hfsmount *hfsmp, struct cnode *cp)
481 if (ISSET(cp->c_hflag, H_ATTACH)) {
485 if (cp->c_hash.le_next || cp->c_hash.le_prev) {
486 LIST_REMOVE(cp, c_hash);
487 cp->c_hash.le_next = NULL;
488 cp->c_hash.le_prev = NULL;
500 hfs_chash_abort(struct hfsmount *hfsmp, struct cnode *cp)
504 LIST_REMOVE(cp, c_hash);
505 cp->c_hash.le_next = NULL;
506 cp->c_hash.le_prev = NULL;
508 CLR(cp->c_hflag, H_ATTACH | H_ALLOC);
509 if (ISSET(cp->c_hflag, H_WAITING)) {
510 CLR(cp->c_hflag, H_WAITING);
511 wakeup((caddr_t)cp);
522 hfs_chash_mark_in_transit(struct hfsmount *hfsmp, struct cnode *cp)
526 SET(cp->c_hflag, H_TRANSIT);
540 struct cnode *cp;
542 for (cp = CNODEHASH(hfsmp, cnid)->lh_first; cp; cp = cp->c_hash.le_next) {
543 if (cp->c_fileid == cnid) {
549 if (cp && ISSET(cp->c_hflag, H_ALLOC | H_TRANSIT | H_ATTACH)) {
550 cp = NULL;
553 return cp;
571 struct cnode *cp;
575 cp = hfs_chash_search_cnid(hfsmp, cnid);
576 if (cp) {
577 if (cp->c_attr.ca_recflags & kHFSHasChildLinkMask) {
580 cp->c_attr.ca_recflags |= kHFSHasChildLinkMask;