]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/hfs/hfs_hotfiles.c
xnu-792.24.17.tar.gz
[apple/xnu.git] / bsd / hfs / hfs_hotfiles.c
index e4d57acb7cb9c7541512cc629c34de81c9ad4c38..19a2268469ab09a8a73d1130fbb37ecb7c1e36a4 100644 (file)
@@ -288,10 +288,13 @@ hfs_recording_stop(struct hfsmount *hfsmp)
        if (hfsmp->hfc_stage != HFC_RECORDING)
                return (EPERM);
 
-       hfsmp->hfc_stage = HFC_BUSY;
-
        hotfiles_collect(hfsmp);
 
+       if (hfsmp->hfc_stage != HFC_RECORDING)
+               return (0);
+
+       hfsmp->hfc_stage = HFC_BUSY;
+
        /*
         * Convert hot file data into a simple file id list....
         *
@@ -756,7 +759,6 @@ 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) ||
@@ -820,7 +822,7 @@ hfs_removehotfile(struct vnode *vp)
        cp = VTOC(vp);
 
        if ((ffp->ff_bytesread == 0) || (ffp->ff_blocks == 0) ||
-           (ffp->ff_size == 0) || (cp->c_atime < hfsmp->hfc_timebase)) {
+           (cp->c_atime < hfsmp->hfc_timebase)) {
                return (0);
        }