Re: [PATCH] RDMA/rtrs: Use flexible array for client path stats

From: Jason Gunthorpe

Date: Sun May 24 2026 - 16:22:18 EST


On Sun, May 10, 2026 at 09:18:12PM -0700, Rosen Penev wrote:
> Store the client path statistics in the RTRS client path allocation
> instead of allocating them separately.
>
> This ties the stats lifetime directly to the path and removes a separate
> allocation failure path. Keep freeing the per-CPU stats data separately,
> but do not free the embedded stats object from error paths or the stats
> kobject release handler.
>
> Assisted-by: Codex:GPT-5.5
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
> Acked-by: Jack Wang <jinpu.wang@xxxxxxxxx>
> ---
> drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c | 2 --
> drivers/infiniband/ulp/rtrs/rtrs-clt.c | 13 ++-----------
> drivers/infiniband/ulp/rtrs/rtrs-clt.h | 2 +-
> 3 files changed, 3 insertions(+), 14 deletions(-)

Applied to for-next

Thanks,
Jason