函数逻辑报告

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

函数名称:Free dquot entry in data block

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

返回类型:int

参数:

类型参数名称
struct qtree_mem_dqinfo *info
struct dquot *dquot
uintblk
417  buf等于getdqbuf(Space usable in block for quota data )
418  ret等于0
420  如果非buf则返回:负ENOMEM
422  如果 Offset of dquot on disk [dq_lock, stable once set] 右移Block size of quota file 位不等于blk
423  quota_error( superblock this applies to , "Quota structure has offset to other block (%u) than it should (%u)", blk, (uint)( Offset of dquot on disk [dq_lock, stable once set] >> Block size of quota file ))
426  转到:out_buf
428  ret等于read_blk(info, blk, buf)
429  如果ret小于0则
430  quota_error( superblock this applies to , "Can't read quota data block %u", blk)
432  转到:out_buf
434  dh等于buf
435  le16_add_cpu( & Number of valid entries in block , - 1)
436  如果非le16_to_cpu(Number of valid entries in block )则
437  ret等于Remove given block from the list of blocks with free entries
438  如果ret大于等于0则ret等于Insert empty block to the list
440  如果ret小于0则
441  quota_error( superblock this applies to , "Can't move quota data block (%u) to free list", blk)
443  转到:out_buf
445  否则
446  memset(buf + ( Offset of dquot on disk [dq_lock, stable once set] & ((1 << Block size of quota file ) - 1)), 0, Size of quota entry in quota file )
453  如果ret小于0则
454  quota_error( superblock this applies to , "Can't insert quota data block (%u) to free entry list", blk)
456  转到:out_buf
458  否则
459  ret等于write_blk(info, blk, buf)
460  如果ret小于0则
461  quota_error( superblock this applies to , "Can't write quota data block %u", blk)
463  转到:out_buf
467  Offset of dquot on disk [dq_lock, stable once set] 等于0
468  out_buf :
469  释放内存
470  返回:ret
调用者
名称描述
remove_treeRemove reference to dquot from tree