Re: [PATCH] drbd: use genl pre_doit/post_doit
From: Jens Axboe
Date: Wed Mar 25 2026 - 09:27:27 EST
On Tue, 24 Mar 2026 16:29:07 +0100, Christoph Böhmwalder wrote:
> Every doit handler followed the same pattern: stack-allocate an
> adm_ctx, call drbd_adm_prepare() at the top, call drbd_adm_finish()
> at the bottom. This duplicated boilerplate across 25 handlers and
> made error paths inconsistent, since some handlers could miss sending
> the reply skb on early-exit paths.
>
> The generic netlink framework already provides pre_doit/post_doit
> hooks for exactly this purpose. An old comment even noted "this
> would be a good candidate for a pre_doit hook".
>
> [...]
Applied, thanks!
[1/1] drbd: use genl pre_doit/post_doit
commit: 630bbba45cfd3e4f9247cefd3e2cdc03fe40421b
Best regards,
--
Jens Axboe