Commit 0066f1b0 authored by David Howells's avatar David Howells Committed by Linus Torvalds

afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked

When trying to get a file lock on an AFS file, the server may return
UAEAGAIN to indicate that the lock is already held.  This is currently
translated by the default path to -EREMOTEIO.

Translate it instead to -EAGAIN so that we know we can retry it.
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Reviewed-by: default avatarJeffrey E Altman <jaltman@auristor.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Link: https://lore.kernel.org/r/166075761334.3533338.2591992675160918098.stgit@warthog.procyon.org.uk/Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 19f516ea
...@@ -69,6 +69,7 @@ int afs_abort_to_error(u32 abort_code) ...@@ -69,6 +69,7 @@ int afs_abort_to_error(u32 abort_code)
/* Unified AFS error table */ /* Unified AFS error table */
case UAEPERM: return -EPERM; case UAEPERM: return -EPERM;
case UAENOENT: return -ENOENT; case UAENOENT: return -ENOENT;
case UAEAGAIN: return -EAGAIN;
case UAEACCES: return -EACCES; case UAEACCES: return -EACCES;
case UAEBUSY: return -EBUSY; case UAEBUSY: return -EBUSY;
case UAEEXIST: return -EEXIST; case UAEEXIST: return -EEXIST;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment