函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\quota\quota_tree.c Create Date:2022-07-29 11:09:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Insert reference to structure into the trie

函数原型:static int do_insert_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint *treeblk, int depth)

返回类型:int

参数:

类型参数名称
struct qtree_mem_dqinfo *info
struct dquot *dquot
uint *treeblk
intdepth
301  buf等于getdqbuf(Space usable in block for quota data )
302  ret等于0, newson等于0, newact等于0
306  如果非buf则返回:负ENOMEM
308  如果非treeblk
309  ret等于Remove empty block from list and return it
310  如果ret小于0则转到:out_buf
312  treeblk等于ret
313  memset(buf, 0, Space usable in block for quota data )
314  newact等于1
315  否则
316  ret等于read_blk(info, * treeblk, buf)
317  如果ret小于0则
318  quota_error( superblock this applies to , "Can't read tree quota block %u", * treeblk)
320  转到:out_buf
323  ref等于buf
324  newblk等于le32_to_cpu(ref[get_index(info, ID this applies to (uid, gid, projid) , depth)])
325  如果非newblknewson等于1
327  如果depth恒等于Precomputed depth of quota tree 减1则
329  如果newblk
334  ret等于负EIO
335  转到:out_buf
338  newblk等于Find space for dquot
339  否则
340  ret等于Insert reference to structure into the trie
342  如果newsonret大于等于0则
343  ref[get_index(info, ID this applies to (uid, gid, projid) , depth)]等于cpu_to_le32(newblk)
345  ret等于write_blk(info, * treeblk, buf)
346  否则如果newactret小于0则
347  Insert empty block to the list
349  out_buf :
350  释放内存
351  返回:ret
调用者
名称描述
do_insert_treeInsert reference to structure into the trie
dq_insert_treeWrapper for inserting quota structure into tree