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.
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>
(cherry picked from commit
a576ff1e53a539e88b9f3fa6b8132d4f161b0bd4)
Change-Id: I558c6989a2a8f4042129e2a60bcd340a7863222c
Reviewed-on: http://gerrit.openafs.org/6796
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.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) {