函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Remove reference to dquot from tree

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

返回类型:int

参数:

类型参数名称
struct qtree_mem_dqinfo *info
struct dquot *dquot
uint *blk
intdepth
477  buf等于getdqbuf(Space usable in block for quota data )
478  ret等于0
480  ref等于buf
482  如果非buf则返回:负ENOMEM
484  ret等于read_blk(info, * blk, buf)
485  如果ret小于0则
486  quota_error( superblock this applies to , "Can't read quota data block %u", * blk)
488  转到:out_buf
490  newblk等于le32_to_cpu(ref[get_index(info, ID this applies to (uid, gid, projid) , depth)])
491  如果depth恒等于Precomputed depth of quota tree 减1则
492  ret等于Free dquot entry in data block
493  newblk等于0
494  否则
495  ret等于Remove reference to dquot from tree
497  如果ret大于等于0且非newblk
499  ref[get_index(info, ID this applies to (uid, gid, projid) , depth)]等于cpu_to_le32(0)
501 i小于Space usable in block for quota data 右移2位且非ref[i]循环如果i恒等于Space usable in block for quota data 右移2位且blk不等于Offset of tree in file in blocks
506  Insert empty block to the list
507  blk等于0
508  否则
509  ret等于write_blk(info, * blk, buf)
510  如果ret小于0则quota_error( superblock this applies to , "Can't write quota tree block %u", * blk)
516  out_buf :
517  释放内存
518  返回:ret
调用者
名称描述
remove_treeRemove reference to dquot from tree
qtree_delete_dquotDelete dquot from tree