Windows: avoid race set/clear ExtentsRequestComplete
authorJeffrey Altman <jaltman@your-file-system.com>
Fri, 19 Oct 2012 12:37:25 +0000 (08:37 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Fri, 19 Oct 2012 15:48:56 +0000 (08:48 -0700)
commitdfcb68cdc82260f614b2efed2529dc7c559d1933
tree64f85e06f4c3377e0ede58c2ae96936af2dfa490
parent555412a03f18aff0d30401082ad2946a68bd7694
Windows: avoid race set/clear ExtentsRequestComplete

The FCB ExtentsRequestComplete KEVENT setting, clearing
and testing was racy.  Clear the event before issuing the
request to the service and if the request fails, set it in
case two threads issued requests for the same FCB in parallel
and one fails and the other succeeds.

We must ensure that a clear does not mask the event being set
prior to the request thread returning.

Change-Id: I6d496214a2621aeca2b9f6d2f50095ffd19b6c59
Reviewed-on: http://gerrit.openafs.org/8255
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
src/WINNT/afsrdr/kernel/lib/AFSExtentsSupport.cpp