lkml.org 
[lkml]   [2022]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 07/21] block, blksnap: init() and exit() functions
On Fri, Dec 09, 2022 at 03:23:17PM +0100, Sergei Shtepa wrote:
> + result = diff_io_init();
> + if (result)
> + return result;
> +
> + result = snapimage_init();
> + if (result)
> + return result;
> +
> + result = tracker_init();
> + if (result)
> + return result;

You need to clean up all these initialization if a later one fails.

Also, does this really need a separate file? Any good reason to
not just keep the tiny amount of init code in ctrl.c?

> +static void __exit blk_snap_exit(void)
> +{
> + pr_info("Unloading module\n");

Also we try to avoid these verbose messages for new code normally.

\
 
 \ /
  Last update: 2022-12-15 10:30    [W:0.366 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site