Skip to content

Commit ff98751

Browse files
dhowellsbrauner
authored andcommitted
afs: Fix the setting of the server responding flag
In afs_wait_for_operation(), we set transcribe the call responded flag to the server record that we used after doing the fileserver iteration loop - but it's possible to exit the loop having had a response from the server that we've discarded (e.g. it returned an abort or we started receiving data, but the call didn't complete). This means that op->server might be NULL, but we don't check that before attempting to set the server flag. Fixes: 98f9fda ("afs: Fold the afs_addr_cursor struct in") 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 19dcfb9 commit ff98751

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/afs/fs_operation.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ void afs_wait_for_operation(struct afs_operation *op)
201201
}
202202
}
203203

204-
if (op->call_responded)
204+
if (op->call_responded && op->server)
205205
set_bit(AFS_SERVER_FL_RESPONDING, &op->server->flags);
206206

207207
if (!afs_op_error(op)) {

0 commit comments

Comments
 (0)