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>
!(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;
- }
}
}
!(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) {