]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
race condition for async IO. We might be OPENING the swapout file, but
authorwessels <>
Fri, 18 Sep 1998 21:15:25 +0000 (21:15 +0000)
committerwessels <>
Fri, 18 Sep 1998 21:15:25 +0000 (21:15 +0000)
the swapout.fd isn't set yet.

src/store_swapout.cc

index 2e20f02be6399b5813bed24caaf2cffaa1427d31..15e694b07985491892a6b82091e8536d069eba7a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapout.cc,v 1.31 1998/09/14 21:28:16 wessels Exp $
+ * $Id: store_swapout.cc,v 1.32 1998/09/18 15:15:25 wessels Exp $
  *
  * DEBUG: section 20    Storage Manager Swapout Functions
  * AUTHOR: Duane Wessels
@@ -371,6 +371,8 @@ storeSwapOutObjectBytesOnDisk(const MemObject * mem)
 static int
 storeSwapOutAble(const StoreEntry * e)
 {
+    if (e->swap_status == SWAPOUT_OPENING)
+       return 1;
     if (e->mem_obj->swapout.fd > -1)
        return 1;
     if (e->mem_obj->inmem_lo > 0)