--------------------- PatchSet 1441 Date: 2001/01/30 13:25:33 Author: adri Branch: sfs Tag: (none) Log: I should allocate the sio before using it. Really. Members: src/fs/sfs/store_io_sfs.c:1.1.2.3->1.1.2.4 Index: squid/src/fs/sfs/store_io_sfs.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/fs/sfs/Attic/store_io_sfs.c,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- squid/src/fs/sfs/store_io_sfs.c 28 Jan 2001 21:54:45 -0000 1.1.2.3 +++ squid/src/fs/sfs/store_io_sfs.c 30 Jan 2001 13:25:33 -0000 1.1.2.4 @@ -1,6 +1,6 @@ /* - * $Id: store_io_sfs.c,v 1.1.2.3 2001/01/28 21:54:45 adri Exp $ + * $Id: store_io_sfs.c,v 1.1.2.4 2001/01/30 13:25:33 adri Exp $ * * DEBUG: section 79 Storage Manager SFS Interface * AUTHOR: Duane Wessels @@ -54,6 +54,9 @@ debug(79, 3) ("storeSfsOpen: fileno %08X\n", f); + sio = CBDATA_ALLOC(storeIOState, storeSfsIOFreeEntry); + sio->fsstate = memPoolAlloc(sfs_state_pool); + fd = sfs_open(sfsinfo->sfsid, f, O_RDONLY, 0, _SFS_IO_SYNC, sio); if (fd < 0) { @@ -62,8 +65,6 @@ } debug(79, 3) ("storeSfsOpen: opened FD %d\n", fd); - sio = CBDATA_ALLOC(storeIOState, storeSfsIOFreeEntry); - sio->fsstate = memPoolAlloc(sfs_state_pool); sio->swap_filen = f; sio->swap_dirn = SD->index; @@ -96,6 +97,9 @@ sfsinfo->suggest = filn + 1; debug(79, 3) ("storeSfsCreate: fileno %08X\n", filn); + + sio = CBDATA_ALLOC(storeIOState, storeSfsIOFreeEntry); + sio->fsstate = memPoolAlloc(sfs_state_pool); fd = sfs_open(sfsinfo->sfsid, filn, O_CREAT | O_RDWR, 0, _SFS_IO_SYNC, sio); @@ -105,8 +109,6 @@ } debug(79, 3) ("storeSfsCreate: opened FD %d\n", fd); - sio = CBDATA_ALLOC(storeIOState, storeSfsIOFreeEntry); - sio->fsstate = memPoolAlloc(sfs_state_pool); sio->swap_filen = filn; sio->swap_dirn = dirn;