Re: [PATCH] drbd: use genl pre_doit/post_doit
Jens Axboe <[email protected]> Wed, 25 Mar 2026 07:11:21 -0600
| Newsgroups | dev.linux.lists.drbd-dev,org.kernel.vger.linux-block,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <177444428198.640671.15773217946231288835.b4-ty@b4> |
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