Windows: be explicit when mapping sharing violation

Only one lock acquistion failure should be mapping to
CM_ERROR_SHARING_VIOLATION.  That is CM_ERROR_LOCK_NOT_GRANTED.
Make it clear that is what we are doing.

Change-Id: Ic1933a989a4e8c95a1417679e9bc7cbc4e14dd12
Reviewed-on: http://gerrit.openafs.org/5299
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
Jeffrey Altman 2011-08-18 21:57:12 -04:00 committed by Jeffrey Altman
parent a6138b412d
commit a576ff1e53

View File

@ -159,17 +159,8 @@ long cm_CheckOpen(cm_scache_t *scp, int openMode, int trunc, cm_user_t *userp,
!(rights & PRSFS_WRITE))
code = 0;
else {
switch (code) {
case CM_ERROR_ALLOFFLINE:
case CM_ERROR_ALLDOWN:
case CM_ERROR_ALLBUSY:
case CM_ERROR_TIMEDOUT:
case CM_ERROR_RETRY:
case CM_ERROR_WOULDBLOCK:
break;
default:
if (code == CM_ERROR_LOCK_NOT_GRANTED)
code = CM_ERROR_SHARING_VIOLATION;
}
}
}
@ -277,17 +268,8 @@ long cm_CheckNTOpen(cm_scache_t *scp, unsigned int desiredAccess,
!(rights & PRSFS_WRITE))
code = 0;
else {
switch (code) {
case CM_ERROR_ALLOFFLINE:
case CM_ERROR_ALLDOWN:
case CM_ERROR_ALLBUSY:
case CM_ERROR_TIMEDOUT:
case CM_ERROR_RETRY:
case CM_ERROR_WOULDBLOCK:
break;
default:
if (code == CM_ERROR_LOCK_NOT_GRANTED)
code = CM_ERROR_SHARING_VIOLATION;
}
}
}
} else if (code != 0) {