函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:di_get_by_id - lookup and get bdi from its id*@id: bdi id to lookup* Find bdi matching @id and get it. Returns NULL if the matching bdi* doesn't exist or is already unregistered.

函数原型:struct backing_dev_info *bdi_get_by_id(u64 id)

返回类型:struct backing_dev_info

参数:

类型参数名称
u64id
919  struct backing_dev_info * bdi = NULL
922  spin_lock_bh( & di_lock protects bdi_tree and updates to bdi_list. bdi_list has RCU* reader side locking.)
923  p等于bdi_lookup_rb_node(id, NULL)
924  如果p
925  bdi等于rb_entry( * p, structbacking_dev_info, rb_node)
926  bdi_get(bdi)
928  spin_unlock_bh( & di_lock protects bdi_tree and updates to bdi_list. bdi_list has RCU* reader side locking.)
930  返回:bdi