Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\quota\quota_tree.c Create Date:2022-07-28 20:33:24
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Remove reference to dquot from tree

Proto:static int remove_tree(struct qtree_mem_dqinfo *info, struct dquot *dquot, uint *blk, int depth)

Type:int

Parameter:

TypeParameterName
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  If Not buf Then Return -ENOMEM
484  ret = read_blk(info, * blk, buf)
485  If ret < 0 Then
486  quota_error( superblock this applies to , "Can't read quota data block %u", * blk)
488  Go to out_buf
490  newblk = le32_to_cpu(ref[get_index(info, ID this applies to (uid, gid, projid) , depth)])
491  If depth == Precomputed depth of quota tree - 1 Then
492  ret = Free dquot entry in data block
493  newblk = 0
494  Else
495  ret = Remove reference to dquot from tree
497  If ret >= 0 && Not newblk Then
499  ref[get_index(info, ID this applies to (uid, gid, projid) , depth)] = cpu_to_le32(0)
501  When i < Space usable in block for quota data >> 2 && Not ref[i] cycle If i == Space usable in block for quota data >> 2 && blk != Offset of tree in file in blocks Then
506  Insert empty block to the list
507  blk = 0
508  Else
509  ret = write_blk(info, * blk, buf)
510  If ret < 0 Then quota_error( superblock this applies to , "Can't write quota tree block %u", * blk)
516  out_buf :
517  kfree(buf)
518  Return ret
Caller
NameDescribe
remove_treeRemove reference to dquot from tree
qtree_delete_dquotDelete dquot from tree