X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/21362eb3e66fd2c787aee132bce100a44d71a99c..4452a7af2eac33dbad800bcc91f2399d62c18f53:/bsd/hfs/hfs_hotfiles.c diff --git a/bsd/hfs/hfs_hotfiles.c b/bsd/hfs/hfs_hotfiles.c index fa59c27e0..2516461a9 100644 --- a/bsd/hfs/hfs_hotfiles.c +++ b/bsd/hfs/hfs_hotfiles.c @@ -294,13 +294,10 @@ hfs_recording_stop(struct hfsmount *hfsmp) if (hfsmp->hfc_stage != HFC_RECORDING) return (EPERM); - hotfiles_collect(hfsmp); - - if (hfsmp->hfc_stage != HFC_RECORDING) - return (0); - hfsmp->hfc_stage = HFC_BUSY; + hotfiles_collect(hfsmp); + /* * Convert hot file data into a simple file id list.... * @@ -765,6 +762,7 @@ hfs_addhotfile_internal(struct vnode *vp) if ((ffp->ff_bytesread == 0) || (ffp->ff_blocks == 0) || + (ffp->ff_size == 0) || (ffp->ff_blocks > hotdata->maxblocks) || (cp->c_flag & (C_DELETED | C_NOEXISTS)) || (cp->c_flags & UF_NODUMP) || @@ -828,7 +826,7 @@ hfs_removehotfile(struct vnode *vp) cp = VTOC(vp); if ((ffp->ff_bytesread == 0) || (ffp->ff_blocks == 0) || - (cp->c_atime < hfsmp->hfc_timebase)) { + (ffp->ff_size == 0) || (cp->c_atime < hfsmp->hfc_timebase)) { return (0); }