]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
afs: Handle the VIO and UAEIO aborts explicitly
authorDavid Howells <dhowells@redhat.com>
Fri, 20 Oct 2023 15:00:18 +0000 (16:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Feb 2024 00:21:07 +0000 (16:21 -0800)
[ Upstream commit eb8eae65f0c713bcef84b082aa919f72c3d83268 ]

When processing the result of a call, handle the VIO and UAEIO abort
specifically rather than leaving it to a default case.  Rather than
erroring out unconditionally, see if there's another server if the volume
has more than one server available, otherwise return -EREMOTEIO.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Stable-dep-of: 17ba6f0bd14f ("afs: Fix error handling with lookup via FS.InlineBulkStatus")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/afs/rotate.c

index 59aed7a6dd115e955834d65e62c61f26cce59795..a108cd55bb4e00cd2a5d853be5efab246499a073 100644 (file)
@@ -330,6 +330,13 @@ bool afs_select_fileserver(struct afs_operation *op)
 
                        goto restart_from_beginning;
 
+               case UAEIO:
+               case VIO:
+                       op->error = -EREMOTEIO;
+                       if (op->volume->type != AFSVL_RWVOL)
+                               goto next_server;
+                       goto failed;
+
                case VDISKFULL:
                case UAENOSPC:
                        /* The partition is full.  Only applies to RWVOLs.