Windows: avoid race during Fcb cleanup
authorJeffrey Altman <jaltman@your-file-system.com>
Sat, 31 Dec 2011 21:07:00 +0000 (16:07 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Sat, 31 Dec 2011 21:22:54 +0000 (13:22 -0800)
commit2ef57a3ee951660cb69d8656e9293c93b28e0d1e
tree82038efe0cb93e29f46d783b856f0b19631c9841
parente2b42e2cde170102c07937d55db376416cb3965c
Windows: avoid race during Fcb cleanup

The worker thread can race with a AFSCleanup() operation and
tear down the Fcb before the AFSCleanup() drops the Fcb->NPFcb->Resource.
Avoid this race by requiring the worker thread to obtain the resource
once before deleting the resource.

Change-Id: Iafad8260c5dfc4187a62c04b14d55ac0bf0e4aeb
Reviewed-on: http://gerrit.openafs.org/6462
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
src/WINNT/afsrdr/kernel/lib/AFSWorker.cpp