mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
quota: Make _SUSPENDED just a flag
Upto now, DQUOT_USR_SUSPENDED behaved like a state - i.e., either quota was enabled or suspended or none. Now allowed states are 0, ENABLED, ENABLED | SUSPENDED. This will be useful later when we implement separate enabling of quota usage tracking and limits enforcement because we need to keep track of a state which has been suspended. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
This commit is contained in:
parent
1497d3ad48
commit
e4bc7b4b7f
2 changed files with 10 additions and 6 deletions
|
@ -67,8 +67,10 @@ static inline struct mem_dqinfo *sb_dqinfo(struct super_block *sb, int type)
|
|||
static inline int sb_has_quota_enabled(struct super_block *sb, int type)
|
||||
{
|
||||
if (type == USRQUOTA)
|
||||
return sb_dqopt(sb)->flags & DQUOT_USR_ENABLED;
|
||||
return sb_dqopt(sb)->flags & DQUOT_GRP_ENABLED;
|
||||
return (sb_dqopt(sb)->flags & DQUOT_USR_ENABLED)
|
||||
&& !(sb_dqopt(sb)->flags & DQUOT_USR_SUSPENDED);
|
||||
return (sb_dqopt(sb)->flags & DQUOT_GRP_ENABLED)
|
||||
&& !(sb_dqopt(sb)->flags & DQUOT_GROUP_SUSPENDED);
|
||||
}
|
||||
|
||||
static inline int sb_any_quota_enabled(struct super_block *sb)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue