From 7b3f5df6dca09a15d56aae5c431a50529c119db2 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sun, 29 Jan 2012 14:41:06 -0500 Subject: [PATCH] Windows: do not panic if afsredir not ready during shutdown Change-Id: I0de6ad0f799e2acf1c02c6d53cfd9b1b437328fc Reviewed-on: http://gerrit.openafs.org/6630 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsrdr/user/RDRInit.cpp | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/WINNT/afsrdr/user/RDRInit.cpp b/src/WINNT/afsrdr/user/RDRInit.cpp index 1441ef4399..18bc9ad9fb 100644 --- a/src/WINNT/afsrdr/user/RDRInit.cpp +++ b/src/WINNT/afsrdr/user/RDRInit.cpp @@ -1309,10 +1309,12 @@ RDR_ProcessRequest( AFSCommRequest *RequestBuffer) osi_Log1(afsd_logp, "%S", osi_LogSaveStringW(afsd_logp, wchBuffer)); } - sprintf( pBuffer, - "Failed to post IOCTL_AFS_PROCESS_IRP_RESULT gle %X", - GetLastError()); - osi_panic(pBuffer, __FILE__, __LINE__); + if (gle != ERROR_NOT_READY) { + sprintf( pBuffer, + "Failed to post IOCTL_AFS_PROCESS_IRP_RESULT gle %X", + GetLastError()); + osi_panic(pBuffer, __FILE__, __LINE__); + } } } @@ -1364,7 +1366,8 @@ RDR_ProcessRequest( AFSCommRequest *RequestBuffer) dwResultBufferLength); } - if (gle != ERROR_GEN_FAILURE) { + if (gle != ERROR_GEN_FAILURE && + gle != ERROR_NOT_READY) { sprintf( pBuffer, "Failed to post IOCTL_AFS_SET_FILE_EXTENTS gle %X", gle); @@ -1417,10 +1420,12 @@ RDR_ProcessRequest( AFSCommRequest *RequestBuffer) } - // TODO - instead of a panic we should release the locks - sprintf( pBuffer, - "Failed to post IOCTL_AFS_SET_BYTE_RANGE_LOCKS gle %X", gle); - osi_panic(pBuffer, __FILE__, __LINE__); + if (gle != ERROR_NOT_READY) { + // TODO - instead of a panic we should release the locks + sprintf( pBuffer, + "Failed to post IOCTL_AFS_SET_BYTE_RANGE_LOCKS gle %X", gle); + osi_panic(pBuffer, __FILE__, __LINE__); + } } free(SetByteRangeLockResultCB);