[PATCH] drbd: use genl pre_doit/post_doit

Jens Axboe axboe at kernel.dk
Wed Mar 25 14:11:21 CET 2026


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





More information about the drbd-dev mailing list