Re: [PATCH] nfsd: Add quotes to client info 'callback address'

From: Jeff Layton
Date: Wed Aug 07 2024 - 06:18:22 EST


On Tue, 2024-08-06 at 18:58 -0700, Mark Grimes wrote:
> The 'callback address' in client_info_show is output without quotes
> causing yaml parsers to fail on processing IPv6 addresses.
> Adding quotes to 'callback address' also matches that used by
> the 'address' field.
>
> Signed-off-by: Mark Grimes <mark.grimes@xxxxxxxxxxxxx>
> ---
> fs/nfsd/nfs4state.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index a20c2c9d7d45..0061ae253f4d 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -2692,7 +2692,7 @@ static int client_info_show(struct seq_file *m, void *v)
> clp->cl_nii_time.tv_sec, clp->cl_nii_time.tv_nsec);
> }
> seq_printf(m, "callback state: %s\n", cb_state2str(clp->cl_cb_state));
> - seq_printf(m, "callback address: %pISpc\n", &clp->cl_cb_conn.cb_addr);
> + seq_printf(m, "callback address: \"%pISpc\"\n", &clp->cl_cb_conn.cb_addr);
> seq_printf(m, "admin-revoked states: %d\n",
> atomic_read(&clp->cl_admin_revoked));
> drop_client(clp);

I agree with Neil's assessment here:

Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>