]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
When done swapping out (storeSwapOutHandle()) if the object became
authorwessels <>
Tue, 21 Oct 1997 01:07:09 +0000 (01:07 +0000)
committerwessels <>
Tue, 21 Oct 1997 01:07:09 +0000 (01:07 +0000)
uncachable, then release it and don't do storeLog() etc.

src/store.cc

index 200e70acfc0b4d1512ca6da2ad1c9b197e5e47af..81c327a3151ed76cb8b6adeabb5c4f5398cf236d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.295 1997/10/18 07:20:57 wessels Exp $
+ * $Id: store.cc,v 1.296 1997/10/20 19:07:09 wessels Exp $
  *
  * DEBUG: section 20    Storeage Manager
  * AUTHOR: Harvest Derived
@@ -913,16 +913,19 @@ storeSwapOutHandle(int fd, int flag, size_t len, void *data)
        storeCheckSwapOut(e);
        return;
     }
-    assert(storeCheckCachable(e));
     /* swapping complete */
-    e->swap_status = SWAPOUT_DONE;
     file_close(mem->swapout.fd);
+    put_free_8k_page(mem->e_swap_buf);
     mem->swapout.fd = -1;
-    storeLog(STORE_LOG_SWAPOUT, e);
     debug(20, 5) ("storeSwapOutHandle: SwapOut complete: '%s' to %s.\n",
        e->url, storeSwapFullPath(e->swap_file_number, NULL));
-    put_free_8k_page(mem->e_swap_buf);
-    storeDirSwapLog(e);
+    if (!storeCheckCachable(e)) {
+       storeReleaseRequest(e);
+    } else {
+       e->swap_status = SWAPOUT_DONE;
+       storeLog(STORE_LOG_SWAPOUT, e);
+        storeDirSwapLog(e);
+    }
     HTTPCacheInfo->proto_newobject(HTTPCacheInfo,
        mem->request->protocol,
        e->object_len,