diff options
-rw-r--r-- | fs/dquot.c | 10 | ||||
-rw-r--r-- | include/linux/quotaops.h | 6 |
2 files changed, 10 insertions, 6 deletions
diff --git a/fs/dquot.c b/fs/dquot.c index c88330602ddd..22340c610e1a 100644 --- a/fs/dquot.c +++ b/fs/dquot.c | |||
@@ -1570,18 +1570,20 @@ static inline void reset_enable_flags(struct quota_info *dqopt, int type, | |||
1570 | { | 1570 | { |
1571 | switch (type) { | 1571 | switch (type) { |
1572 | case USRQUOTA: | 1572 | case USRQUOTA: |
1573 | dqopt->flags &= ~DQUOT_USR_ENABLED; | ||
1574 | if (remount) | 1573 | if (remount) |
1575 | dqopt->flags |= DQUOT_USR_SUSPENDED; | 1574 | dqopt->flags |= DQUOT_USR_SUSPENDED; |
1576 | else | 1575 | else { |
1576 | dqopt->flags &= ~DQUOT_USR_ENABLED; | ||
1577 | dqopt->flags &= ~DQUOT_USR_SUSPENDED; | 1577 | dqopt->flags &= ~DQUOT_USR_SUSPENDED; |
1578 | } | ||
1578 | break; | 1579 | break; |
1579 | case GRPQUOTA: | 1580 | case GRPQUOTA: |
1580 | dqopt->flags &= ~DQUOT_GRP_ENABLED; | ||
1581 | if (remount) | 1581 | if (remount) |
1582 | dqopt->flags |= DQUOT_GRP_SUSPENDED; | 1582 | dqopt->flags |= DQUOT_GRP_SUSPENDED; |
1583 | else | 1583 | else { |
1584 | dqopt->flags &= ~DQUOT_GRP_ENABLED; | ||
1584 | dqopt->flags &= ~DQUOT_GRP_SUSPENDED; | 1585 | dqopt->flags &= ~DQUOT_GRP_SUSPENDED; |
1586 | } | ||
1585 | break; | 1587 | break; |
1586 | } | 1588 | } |
1587 | } | 1589 | } |
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) |