Skip to content

Commit e30458d

Browse files
dhowellsbrauner
authored andcommitted
afs: Fix the fallback handling for the YFS.RemoveFile2 RPC call
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: e49c7b2 ("afs: Build an abstraction around an "operation" concept") Signed-off-by: David Howells <[email protected]> Link: https://lore.kernel.org/r/[email protected] cc: Marc Dionne <[email protected]> cc: [email protected] Signed-off-by: Christian Brauner <[email protected]>
1 parent 178902b commit e30458d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

fs/afs/yfsclient.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,8 +666,9 @@ static int yfs_deliver_fs_remove_file2(struct afs_call *call)
666666
static void yfs_done_fs_remove_file2(struct afs_call *call)
667667
{
668668
if (call->error == -ECONNABORTED &&
669-
call->abort_code == RX_INVALID_OPERATION) {
670-
set_bit(AFS_SERVER_FL_NO_RM2, &call->server->flags);
669+
(call->abort_code == RX_INVALID_OPERATION ||
670+
call->abort_code == RXGEN_OPCODE)) {
671+
set_bit(AFS_SERVER_FL_NO_RM2, &call->op->server->flags);
671672
call->op->flags |= AFS_OPERATION_DOWNGRADE;
672673
}
673674
}

0 commit comments

Comments
 (0)