mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 23:40:13 +00:00
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:
parent
a6138b412d
commit
a576ff1e53
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user