The loop is unnecessary, both susv4 as well as the Linux manpage
explicitly say:
> These functions shall not return an error code of [EINTR].
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
#ifdef HAVE_ROBUST_MUTEXES
if (xconn->smb1.echo_handler.socket_mutex != NULL) {
- int ret = EINTR;
-
- while (ret == EINTR) {
- ret = pthread_mutex_unlock(
- xconn->smb1.echo_handler.socket_mutex);
- if (ret == 0) {
- break;
- }
- }
+ int ret;
+ ret = pthread_mutex_unlock(
+ xconn->smb1.echo_handler.socket_mutex);
if (ret != 0) {
DEBUG(1, ("pthread_mutex_unlock failed: %s\n",
strerror(ret)));