Skip to content

Commit 0066f1b

Browse files
dhowellstorvalds
authored andcommitted
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: David Howells <[email protected]> Reviewed-by: Jeffrey E Altman <[email protected]> cc: Marc Dionne <[email protected]> cc: [email protected] Link: https://lore.kernel.org/r/166075761334.3533338.2591992675160918098.stgit@warthog.procyon.org.uk/ Signed-off-by: Linus Torvalds <[email protected]>
1 parent 19f516e commit 0066f1b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/afs/misc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ int afs_abort_to_error(u32 abort_code)
6969
/* Unified AFS error table */
7070
case UAEPERM: return -EPERM;
7171
case UAENOENT: return -ENOENT;
72+
case UAEAGAIN: return -EAGAIN;
7273
case UAEACCES: return -EACCES;
7374
case UAEBUSY: return -EBUSY;
7475
case UAEEXIST: return -EEXIST;

0 commit comments

Comments
 (0)