will never be NULL, it's sd->log.clean.state that's the problem.
Also, this way I get to fix it in four files, not just one.
/*
- * $Id: store_dir_aufs.cc,v 1.19 2000/11/30 20:12:46 wessels Exp $
+ * $Id: store_dir_aufs.cc,v 1.20 2000/12/05 09:11:30 wessels Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
storeAufsDirWriteCleanDone(SwapDir * sd)
{
struct _clean_state *state = sd->log.clean.state;
+ if (NULL == state)
+ return;
if (state->fd < 0)
return;
state->walker->Done(state->walker);
/*
- * $Id: store_dir_coss.cc,v 1.10 2000/11/30 20:08:50 wessels Exp $
+ * $Id: store_dir_coss.cc,v 1.11 2000/12/05 09:11:31 wessels Exp $
*
* DEBUG: section 81 Store COSS Directory Routines
* AUTHOR: Eric Stern
storeCossDirWriteCleanDone(SwapDir * sd)
{
struct _clean_state *state = sd->log.clean.state;
+ if (NULL == state)
+ return;
if (state->fd < 0)
return;
if (write(state->fd, state->outbuf, state->outbuf_offset) < 0) {
/*
- * $Id: store_dir_diskd.cc,v 1.26 2000/11/30 20:08:50 wessels Exp $
+ * $Id: store_dir_diskd.cc,v 1.27 2000/12/05 09:11:31 wessels Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
storeDiskdDirWriteCleanDone(SwapDir * sd)
{
struct _clean_state *state = sd->log.clean.state;
+ if (NULL == state)
+ return;
if (state->fd < 0)
return;
state->walker->Done(state->walker);
/*
- * $Id: store_dir_ufs.cc,v 1.16 2000/11/30 20:08:51 wessels Exp $
+ * $Id: store_dir_ufs.cc,v 1.17 2000/12/05 09:11:34 wessels Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
storeUfsDirWriteCleanDone(SwapDir * sd)
{
struct _clean_state *state = sd->log.clean.state;
+ if (NULL == state)
+ return;
if (state->fd < 0)
return;
state->walker->Done(state->walker);
/*
- * $Id: store_dir.cc,v 1.116 2000/12/05 09:03:31 wessels Exp $
+ * $Id: store_dir.cc,v 1.117 2000/12/05 09:11:24 wessels Exp $
*
* DEBUG: section 47 Store Directory Routines
* AUTHOR: Duane Wessels
/* Flush */
for (dirn = 0; dirn < Config.cacheSwap.n_configured; dirn++) {
sd = &Config.cacheSwap.swapDirs[dirn];
- if (sd->log.clean.done)
- sd->log.clean.done(sd);
+ sd->log.clean.done(sd);
}
if (reopen)
storeDirOpenSwapLogs();