]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/hfs/hfs_hotfiles.c
xnu-792.22.5.tar.gz
[apple/xnu.git] / bsd / hfs / hfs_hotfiles.c
index fa59c27e09060fcab4b461e5d04958554010eee4..2516461a973b6372676082e205ee09a461af69ee 100644 (file)
@@ -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);
        }