函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\zswap.c Create Date:2022-07-27 16:53:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:zswap_pool_create

函数原型:static struct zswap_pool *zswap_pool_create(char *type, char *compressor)

返回类型:struct zswap_pool

参数:

类型参数名称
char *type
char *compressor
508  gfp等于__GFP_NORETRY按位或DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.按位或kswapd can wake
511  如果非it completed, but couldn't create the initial pool
516  如果非字符串比较则返回:NULL
518  如果非字符串比较则返回:NULL
522  pool等于分配内存并置零
523  如果非pool则返回:NULL
527  snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
529  zpool等于zpool_create_pool(type, name, gfp, & zswap_zpool_ops)
530  如果非zpool
531  打印错误信息("%s zpool not available\n", type)
532  转到:error
534  pr_debug("using %s zpool\n", zpool_get_type(zpool))
536  长字符串复制
537  tfm等于alloc_percpu(structcrypto_comp * )
538  如果非tfm
539  打印错误信息("percpu alloc failed\n")
540  转到:error
543  ret等于puhp_state_add_instance - Add an instance for a state and invoke startup* callback.*@state: The state for which the instance is installed*@node: The node for this individual state.* Installs the instance for the @state and invokes the startup callback on
545  如果ret则转到:error
547  pr_debug("using %s compressor\n", tfm_name)
552  初始化对象
553  初始化链表头
555  helpers and fwd declarations("created", pool)
557  返回:pool
559  error :
560  释放内存
561  如果zpoolzpool_destroy_pool(zpool)
563  释放内存
564  返回:NULL
调用者
名称描述
__zswap_pool_create_fallback
__zswap_param_setval must be a null-terminated string