DEVEL15-flock-handle-uae-errors-20060601

handle uae versions of errors for flock locks


(cherry picked from commit 99b572a00a342ab6ff003eb6736eb24a27e8fb15)
This commit is contained in:
Chaskiel M Grundman 2006-06-02 22:25:26 +00:00 committed by Derrick Brashear
parent cf9182c61f
commit 1eb78d4f8d

View File

@ -24,6 +24,7 @@ RCSID
#include "afs/afs_cbqueue.h"
#include "afs/nfsclient.h"
#include "afs/afs_osidnlc.h"
#include "afs/unified_afs.h"
/* Static prototypes */
static int HandleGetLock(register struct vcache *avc,
@ -422,7 +423,8 @@ HandleFlock(register struct vcache *avc, int acom, struct vrequest *areq,
break;
}
/* now, if we got EWOULDBLOCK, and we're supposed to wait, we do */
if (((code == EWOULDBLOCK) || (code == EAGAIN))
if (((code == EWOULDBLOCK) || (code == EAGAIN) ||
(code == UAEWOULDBLOCK) || (code == UAEAGAIN))
&& !(acom & LOCK_NB)) {
/* sleep for a second, allowing interrupts */
ReleaseWriteLock(&avc->lock);