Skip to content

Commit 4b9bdfa

Browse files
LiBaokun96jankara
authored andcommitted
quota: rename dquot_active() to inode_quota_active()
Now we have a helper function dquot_dirty() to determine if dquot has DQ_MOD_B bit. dquot_active() can easily be misunderstood as a helper function to determine if dquot has DQ_ACTIVE_B bit. So we avoid this by renaming it to inode_quota_active() and later on we will add the helper function dquot_active() to determine if dquot has DQ_ACTIVE_B bit. Signed-off-by: Baokun Li <libaokun1@huawei.com> Signed-off-by: Jan Kara <jack@suse.cz> Message-Id: <20230630110822.3881712-3-libaokun1@huawei.com>
1 parent 0241284 commit 4b9bdfa

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

fs/quota/dquot.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ static int info_bdq_free(struct dquot *dquot, qsize_t space)
14181418
return QUOTA_NL_NOWARN;
14191419
}
14201420

1421-
static int dquot_active(const struct inode *inode)
1421+
static int inode_quota_active(const struct inode *inode)
14221422
{
14231423
struct super_block *sb = inode->i_sb;
14241424

@@ -1441,7 +1441,7 @@ static int __dquot_initialize(struct inode *inode, int type)
14411441
qsize_t rsv;
14421442
int ret = 0;
14431443

1444-
if (!dquot_active(inode))
1444+
if (!inode_quota_active(inode))
14451445
return 0;
14461446

14471447
dquots = i_dquot(inode);
@@ -1549,7 +1549,7 @@ bool dquot_initialize_needed(struct inode *inode)
15491549
struct dquot **dquots;
15501550
int i;
15511551

1552-
if (!dquot_active(inode))
1552+
if (!inode_quota_active(inode))
15531553
return false;
15541554

15551555
dquots = i_dquot(inode);
@@ -1660,7 +1660,7 @@ int __dquot_alloc_space(struct inode *inode, qsize_t number, int flags)
16601660
int reserve = flags & DQUOT_SPACE_RESERVE;
16611661
struct dquot **dquots;
16621662

1663-
if (!dquot_active(inode)) {
1663+
if (!inode_quota_active(inode)) {
16641664
if (reserve) {
16651665
spin_lock(&inode->i_lock);
16661666
*inode_reserved_space(inode) += number;
@@ -1730,7 +1730,7 @@ int dquot_alloc_inode(struct inode *inode)
17301730
struct dquot_warn warn[MAXQUOTAS];
17311731
struct dquot * const *dquots;
17321732

1733-
if (!dquot_active(inode))
1733+
if (!inode_quota_active(inode))
17341734
return 0;
17351735
for (cnt = 0; cnt < MAXQUOTAS; cnt++)
17361736
warn[cnt].w_type = QUOTA_NL_NOWARN;
@@ -1773,7 +1773,7 @@ int dquot_claim_space_nodirty(struct inode *inode, qsize_t number)
17731773
struct dquot **dquots;
17741774
int cnt, index;
17751775

1776-
if (!dquot_active(inode)) {
1776+
if (!inode_quota_active(inode)) {
17771777
spin_lock(&inode->i_lock);
17781778
*inode_reserved_space(inode) -= number;
17791779
__inode_add_bytes(inode, number);
@@ -1815,7 +1815,7 @@ void dquot_reclaim_space_nodirty(struct inode *inode, qsize_t number)
18151815
struct dquot **dquots;
18161816
int cnt, index;
18171817

1818-
if (!dquot_active(inode)) {
1818+
if (!inode_quota_active(inode)) {
18191819
spin_lock(&inode->i_lock);
18201820
*inode_reserved_space(inode) += number;
18211821
__inode_sub_bytes(inode, number);
@@ -1859,7 +1859,7 @@ void __dquot_free_space(struct inode *inode, qsize_t number, int flags)
18591859
struct dquot **dquots;
18601860
int reserve = flags & DQUOT_SPACE_RESERVE, index;
18611861

1862-
if (!dquot_active(inode)) {
1862+
if (!inode_quota_active(inode)) {
18631863
if (reserve) {
18641864
spin_lock(&inode->i_lock);
18651865
*inode_reserved_space(inode) -= number;
@@ -1914,7 +1914,7 @@ void dquot_free_inode(struct inode *inode)
19141914
struct dquot * const *dquots;
19151915
int index;
19161916

1917-
if (!dquot_active(inode))
1917+
if (!inode_quota_active(inode))
19181918
return;
19191919

19201920
dquots = i_dquot(inode);
@@ -2086,7 +2086,7 @@ int dquot_transfer(struct mnt_idmap *idmap, struct inode *inode,
20862086
struct super_block *sb = inode->i_sb;
20872087
int ret;
20882088

2089-
if (!dquot_active(inode))
2089+
if (!inode_quota_active(inode))
20902090
return 0;
20912091

20922092
if (i_uid_needs_update(idmap, iattr, inode)) {

0 commit comments

Comments
 (0)