diff options
| author | David Howells <dhowells@redhat.com> | 2025-01-14 14:46:03 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-03-13 12:46:44 +0100 |
| commit | de4d0fd96515fde2f079ee7485399046e46a28ed (patch) | |
| tree | d8d99784a95716cb2e3213eb9a05de5fd9310bf5 /fs/afs | |
| parent | 59ebff2a2f779f8330c046f76309a1bb232653db (diff) | |
afs: Fix the fallback handling for the YFS.RemoveFile2 RPC call
[ Upstream commit e30458d690f35abb01de8b3cbc09285deb725d00 ]
Fix a pair of bugs in the fallback handling for the YFS.RemoveFile2 RPC
call:
(1) Fix the abort code check to also look for RXGEN_OPCODE. The lack of
this masks the second bug.
(2) call->server is now not used for ordinary filesystem RPC calls that
have an operation descriptor. Fix to use call->op->server instead.
Fixes: e49c7b2f6de7 ("afs: Build an abstraction around an "operation" concept")
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://lore.kernel.org/r/109541.1736865963@warthog.procyon.org.uk
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/afs')
| -rw-r--r-- | fs/afs/yfsclient.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/afs/yfsclient.c b/fs/afs/yfsclient.c index 5b2ef5ffd716..171de355a7e5 100644 --- a/fs/afs/yfsclient.c +++ b/fs/afs/yfsclient.c @@ -689,8 +689,9 @@ static int yfs_deliver_fs_remove_file2(struct afs_call *call) static void yfs_done_fs_remove_file2(struct afs_call *call) { if (call->error == -ECONNABORTED && - call->abort_code == RX_INVALID_OPERATION) { - set_bit(AFS_SERVER_FL_NO_RM2, &call->server->flags); + (call->abort_code == RX_INVALID_OPERATION || + call->abort_code == RXGEN_OPCODE)) { + set_bit(AFS_SERVER_FL_NO_RM2, &call->op->server->flags); call->op->flags |= AFS_OPERATION_DOWNGRADE; } } |
