diff options
author | Jan Kara <jack@suse.cz> | 2008-08-20 10:21:01 -0400 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-01-05 11:36:56 -0500 |
commit | e4bc7b4b7ff783779b6928d55a9308910bf180a3 (patch) | |
tree | 1cf54906c8686507f9cc127754210930d27a0471 /include/linux/quotaops.h | |
parent | 1497d3ad487b64eeea83ac203263802755438949 (diff) |
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>
Diffstat (limited to 'include/linux/quotaops.h')
-rw-r--r-- | include/linux/quotaops.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h index adcc7ba3accb..ffd97071cd1e 100644 --- a/include/linux/quotaops.h +++ b/include/linux/quotaops.h | |||
@@ -67,8 +67,10 @@ static inline struct mem_dqinfo *sb_dqinfo(struct super_block *sb, int type) | |||
67 | static inline int sb_has_quota_enabled(struct super_block *sb, int type) | 67 | static inline int sb_has_quota_enabled(struct super_block *sb, int type) |
68 | { | 68 | { |
69 | if (type == USRQUOTA) | 69 | if (type == USRQUOTA) |
70 | return sb_dqopt(sb)->flags & DQUOT_USR_ENABLED; | 70 | return (sb_dqopt(sb)->flags & DQUOT_USR_ENABLED) |
71 | return sb_dqopt(sb)->flags & DQUOT_GRP_ENABLED; | 71 | && !(sb_dqopt(sb)->flags & DQUOT_USR_SUSPENDED); |
72 | return (sb_dqopt(sb)->flags & DQUOT_GRP_ENABLED) | ||
73 | && !(sb_dqopt(sb)->flags & DQUOT_GROUP_SUSPENDED); | ||
72 | } | 74 | } |
73 | 75 | ||
74 | static inline int sb_any_quota_enabled(struct super_block *sb) | 76 | static inline int sb_any_quota_enabled(struct super_block *sb) |