linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked
@ 2022-09-06 21:09 David Howells
  2022-09-07  1:33 ` Linus Torvalds
  0 siblings, 1 reply; 3+ messages in thread
From: David Howells @ 2022-09-06 21:09 UTC (permalink / raw)
  To: torvalds
  Cc: dhowells, marc.dionne, jaltman, linux-afs, linux-fsdevel, linux-kernel

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.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeffrey 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/
---
 fs/afs/misc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/afs/misc.c b/fs/afs/misc.c
index 933e67fcdab1..805328ca5428 100644
--- a/fs/afs/misc.c
+++ b/fs/afs/misc.c
@@ -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;


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked
  2022-09-06 21:09 [PATCH] afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked David Howells
@ 2022-09-07  1:33 ` Linus Torvalds
  0 siblings, 0 replies; 3+ messages in thread
From: Linus Torvalds @ 2022-09-07  1:33 UTC (permalink / raw)
  To: David Howells
  Cc: marc.dionne, jaltman, linux-afs, linux-fsdevel, linux-kernel

On Tue, Sep 6, 2022 at 5:09 PM David Howells <dhowells@redhat.com> wrote:
>
> Can you apply this please?

Done.

             Linus

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked
@ 2022-08-17 17:33 David Howells
  0 siblings, 0 replies; 3+ messages in thread
From: David Howells @ 2022-08-17 17:33 UTC (permalink / raw)
  To: marc.dionne; +Cc: linux-afs, dhowells, linux-kernel

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 <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
---

 fs/afs/misc.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/afs/misc.c b/fs/afs/misc.c
index 933e67fcdab1..805328ca5428 100644
--- a/fs/afs/misc.c
+++ b/fs/afs/misc.c
@@ -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;



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-07  1:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-06 21:09 [PATCH] afs: Return -EAGAIN, not -EREMOTEIO, when a file already locked David Howells
2022-09-07  1:33 ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2022-08-17 17:33 David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).