[bug report] afs: Add support for RENAME_NOREPLACE and RENAME_EXCHANGE

David Howells dhowells at redhat.com
Wed Sep 24 05:36:50 PDT 2025


Dan Carpenter <dan.carpenter at linaro.org> wrote:

>     435                 case RX_INVALID_OPERATION:
>     436                 case RXGEN_OPCODE:
>     437                         /* Handle downgrading to an older operation. */
>     438                         afs_op_set_error(op, -ENOTSUPP);
>     439                         if (op->flags & AFS_OPERATION_DOWNGRADE) {
>     440                                 op->flags &= ~AFS_OPERATION_DOWNGRADE;
>     441                                 goto go_again;
> 
> addr_index is not set on this path.
>...
>     632 
>     633 go_again:
>     634         op->volsync.creation = TIME64_MIN;
>     635         op->volsync.update = TIME64_MIN;
>     636         op->call_responded = false;
> --> 637         _debug("address [%u] %u/%u %pISp",
>     638                op->server_index, addr_index, alist->nr_addrs,
>                                          ^^^^^^^^^^

I think the thing to do is to move the _debug() statement above the label,
e.g.:

	_debug("address [%u] %u/%u %pISp",
	       op->server_index, addr_index, alist->nr_addrs,
	       rxrpc_kernel_remote_addr(alist->addrs[op->addr_index].peer));
go_again:
	op->volsync.creation = TIME64_MIN;
	op->volsync.update = TIME64_MIN;
	op->call_responded = false;
	_leave(" = t");
	return true;

David




More information about the linux-afs mailing list