Skip to contentSkip to conversation

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

PATCH In review David Howells 2 participants 2 messages Sep 6, 2022 – Sep 7, 2022

Subsystems (2)
lore
Share & tools
lore

David Howells

author maintainer
#0 lore raw

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

Hi Linus,

Can you apply this please?

Thanks,
David
---
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.

---
 fs/afs/misc.c |    1 +
 1 file changed, 1 insertion(+)
fs/afs/misc.c +1 -0
index 933e67fcdab1..805328ca5428 100644
@@ -69,6 +69,7 @@ int afs_abort_to_error(u32 abort_code)
 		/* Unified AFS error table */
 	case UAEPERM:			return -EPERM;
 	case UAENOENT:			return -ENOENT;
+	case UAEAGAIN:			return -EAGAIN;
 	case UAEACCES:			return -EACCES;
 	case UAEBUSY:			return -EBUSY;
 	case UAEEXIST:			return -EEXIST;
#1 lore raw
Quoted 2 lines · David Howells

Can you apply this please?

Done.

Linus