Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Wrapper for transferring ownership of an inode for uid/gid only* Called from FSXXX_setattr()

Proto:int dquot_transfer(struct inode *inode, struct iattr *iattr)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct iattr *iattr
2076  struct dquot * transfer_to[3] = {}
2078  sb = i_sb
2081  If Not dquot_active(inode) Then Return 0
2084  If ia_valid & ATTR_UID && Not uid_eq(ia_uid, i_uid) Then
2085  dquot = Get reference to dquot* Locking is slightly tricky here. We are guarded from parallel quotaoff()* destroying our dquot by:* a) checking for quota flags under dq_list_lock and* b) getting a reference to dquot before we release dq_list_lock
2086  If IS_ERR(dquot) Then
2087  If PTR_ERR(dquot) != -ESRCH Then
2088  ret = PTR_ERR(dquot)
2089  Go to out_put
2091  dquot = NULL
2093  transfer_to[lement used for user quotas ] = dquot
2095  If ia_valid & ATTR_GID && Not gid_eq(ia_gid, i_gid) Then
2096  dquot = Get reference to dquot* Locking is slightly tricky here. We are guarded from parallel quotaoff()* destroying our dquot by:* a) checking for quota flags under dq_list_lock and* b) getting a reference to dquot before we release dq_list_lock
2097  If IS_ERR(dquot) Then
2098  If PTR_ERR(dquot) != -ESRCH Then
2099  ret = PTR_ERR(dquot)
2100  Go to out_put
2102  dquot = NULL
2104  transfer_to[lement used for group quotas ] = dquot
2106  ret = Transfer the number of inode and blocks from one diskquota to an other
2107  out_put :
2108  dqput_all(transfer_to)
2109  Return ret