浏览代码

quota: add a convenience macro for filesystems

Note that it cannot be an inline function because we don't have struct
super_block prototype...

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Jan Kara 17 年之前
父节点
当前提交
c32e026efc
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      include/linux/quota.h

+ 3 - 0
include/linux/quota.h

@@ -347,6 +347,9 @@ struct quota_info {
 	((type) == USRQUOTA ? (sb_dqopt(sb)->flags & DQUOT_USR_SUSPENDED) : \
 	((type) == USRQUOTA ? (sb_dqopt(sb)->flags & DQUOT_USR_SUSPENDED) : \
 			      (sb_dqopt(sb)->flags & DQUOT_GRP_SUSPENDED))
 			      (sb_dqopt(sb)->flags & DQUOT_GRP_SUSPENDED))
 
 
+#define sb_any_quota_suspended(sb) (sb_has_quota_suspended(sb, USRQUOTA) | \
+				  sb_has_quota_suspended(sb, GRPQUOTA))
+
 int register_quota_format(struct quota_format_type *fmt);
 int register_quota_format(struct quota_format_type *fmt);
 void unregister_quota_format(struct quota_format_type *fmt);
 void unregister_quota_format(struct quota_format_type *fmt);