• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/hfs/

Lines Matching refs:cp

102 	struct cnode *cp;
125 cp = VTOC(vp);
130 hfs_lock_truncate(cp, 0);
147 cp->c_touch_acctime = TRUE;
163 hfs_lock(cp, HFS_FORCE_LOCK);
170 if (cp->c_atime < hfsmp->hfc_timebase) {
175 cp->c_atime = tv.tv_sec;
180 hfs_unlock(cp);
183 hfs_unlock_truncate(cp, 0);
195 struct cnode *cp;
229 cp = VTOC(vp);
249 hfs_lock_truncate(cp, exclusive_lock);
255 if ((cp->c_flags & APPEND) && offset != fp->ff_size) {
273 if (lck_rw_lock_shared_to_exclusive(&cp->c_truncatelock) == FALSE) {
298 retval = hfs_chkdq(cp, (int64_t)(roundup(bytesToAdd, hfsmp->blockSize)),
429 hfs_unlock(cp);
435 hfs_lock(cp, HFS_FORCE_LOCK);
444 cp->c_zftimeout = tv.tv_sec + ZFTIMELIMIT;
480 hfs_unlock(cp);
528 cp->c_touch_chgtime = TRUE;
529 cp->c_touch_modtime = TRUE;
551 if (cp->c_mode & (S_ISUID | S_ISGID)) {
555 hfs_lock(cp, HFS_FORCE_LOCK);
558 cp->c_mode &= ~(S_ISUID | S_ISGID);
564 hfs_lock(cp, HFS_FORCE_LOCK);
576 hfs_lock(cp, HFS_FORCE_LOCK);
588 hfs_unlock(cp);
589 hfs_unlock_truncate(cp, exclusive_lock);
1711 register struct cnode *cp;
1719 cp = VTOC(vp);
1726 hfs_unlock(cp);
2051 struct cnode *cp;
2082 cp = VTOC(vp);
2137 cp->c_blocks += loanedBlocks;
2145 cp->c_flag |= C_MODIFIED;
2281 hfs_unlock(cp);
2306 register struct cnode *cp = VTOC(vp);
2350 if ((retval = hfs_getinoquota(cp)))
2361 retval = hfs_chkdq(cp, (int64_t)(roundup(length - filebytes, blksize)),
2385 hfs_virtualmetafile(cp)) {
2454 hfs_unlock(cp);
2458 hfs_lock(cp, HFS_FORCE_LOCK);
2465 cp->c_zftimeout = tv.tv_sec + ZFTIMELIMIT;
2474 cp->c_zftimeout = tv.tv_sec + ZFTIMELIMIT;
2481 cp->c_touch_modtime = TRUE;
2502 cp->c_blocks -= loanedBlocks;
2515 cp->c_blocks += loanedBlocks;
2563 (void) hfs_chkdq(cp, (int64_t)-(savedbytes - filebytes), NOCRED, 0);
2568 cp->c_touch_modtime = TRUE;
2571 cp->c_touch_chgtime = TRUE; /* status changed */
2572 cp->c_touch_modtime = TRUE; /* file data was modified */
2602 struct cnode *cp = VTOC(vp);
2639 cp->c_flag |= C_FORCEUPDATE;
2651 cp->c_flag |= C_FORCEUPDATE;
2684 struct cnode *cp;
2707 cp = VTOC(vp);
2709 hfs_lock_truncate(cp, TRUE);
2711 if ((retval = hfs_lock(cp, HFS_EXCLUSIVE_LOCK))) {
2761 retval = hfs_chkdq(cp,
2775 if (hfs_virtualmetafile(cp)) {
2873 (void) hfs_chkdq(cp, (int64_t)-((startingPEOF - filebytes)), NOCRED,0);
2879 hfs_unlock(cp);
2881 hfs_lock(cp, HFS_FORCE_LOCK);
2886 cp->c_touch_chgtime = TRUE;
2887 cp->c_touch_modtime = TRUE;
2893 hfs_unlock_truncate(cp, TRUE);
2894 hfs_unlock(cp);
2925 struct cnode *cp;
2930 cp = VTOC(vp);
2939 if ((fp->ff_bytesread + bytesread) > 0x00000000ffffffff && cp->c_lockowner != current_thread()) {
2940 hfs_lock(cp, HFS_FORCE_LOCK);
2947 if (cp->c_atime < VTOHFS(vp)->hfc_timebase) {
2952 cp->c_atime = tv.tv_sec;
2956 cp->c_touch_acctime = TRUE;
2958 hfs_unlock(cp);
2981 struct cnode *cp;
2986 cp = VTOC(vp);
3003 if (cp->c_lockowner != current_thread()) {
3004 if ( (retval = hfs_lock(cp, HFS_EXCLUSIVE_LOCK))) {
3023 cp->c_flag |= C_MODIFIED; /* leof is dirty */
3027 hfs_unlock(cp);
3040 (cp->c_mode & (S_ISUID | S_ISGID)) &&
3042 hfs_lock(cp, HFS_FORCE_LOCK);
3043 cp->c_mode &= ~(S_ISUID | S_ISGID);
3044 cp->c_touch_chgtime = TRUE;
3045 hfs_unlock(cp);
3142 struct cnode *cp;
3169 cp = VTOC(vp);
3194 hfs_unlock(cp);
3195 hfs_lock_truncate(cp, TRUE);
3197 if ((retval = hfs_lock(cp, HFS_FORCE_LOCK))) {
3198 hfs_unlock_truncate(cp, TRUE);
3202 if (cp->c_flag & C_NOEXISTS) {
3203 hfs_unlock_truncate(cp, TRUE);
3218 hfs_unlock_truncate(cp, TRUE);
3251 cp->c_flag |= C_MODIFIED;
3273 if (cp->c_desc.cd_nameptr != NULL) {
3274 filestr = (const char *)&cp->c_desc.cd_nameptr[0];
3337 hfs_unlock_truncate(cp, TRUE);
3349 if (cp->c_cnid < kHFSFirstUserCatalogNodeID)
3363 hfs_unlock_truncate(cp, TRUE);
3382 hfs_unlock_truncate(cp, TRUE);