Windows: Do not reference cm_data.rootSCachep directly
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 31 Jul 2010 04:21:06 +0000 (00:21 -0400)
committerJeffrey Altman <jaltman@openafs.org>
Mon, 2 Aug 2010 16:27:18 +0000 (09:27 -0700)
commit89afd3c21e816c29f497c10cf76673d009cdd919
treeebc12f7f79fc5b99cec44aa8d012dfd3a3319ad9
parent78f99d4a025d3b369d3ad4939098ea868feb6cfc
Windows: Do not reference cm_data.rootSCachep directly

cm_data.rootSCachep is a global pointer to the cm_scache_t that
represents the root.afs volume root directory.  Throughout the
code this cm_scache_t was being used without ensuring that a
callback to the volume is in fact valid.

Under most circumstances this would not be a problem.  However,
it is possible for a request to fail due to the lack of a callback
at a critical moment.  Add a new function cm_rootScachep() that
attempts to ensure that a callback is present (if possible) prior
to use the cm_scache_t object.

LICENSE MIT

Change-Id: I997dc05a2214788d32727c261947206a61cd8d32
Reviewed-on: http://gerrit.openafs.org/2491
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
src/WINNT/afsd/cm_freelance.c
src/WINNT/afsd/cm_scache.c
src/WINNT/afsd/cm_scache.h
src/WINNT/afsd/cm_vnodeops.c
src/WINNT/afsd/cm_volstat.c
src/WINNT/afsd/rpc_srvsvc.c
src/WINNT/afsd/smb.c
src/WINNT/afsd/smb3.c
src/WINNT/afsd/smb_ioctl.c