summaryrefslogtreecommitdiff
path: root/include/linux/quotaops.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/quotaops.h')
-rw-r--r--include/linux/quotaops.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index a109e6107c06..50ab5d6ccc4e 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -51,6 +51,16 @@ static inline struct dquot *dqgrab(struct dquot *dquot)
atomic_inc(&dquot->dq_count);
return dquot;
}
+
+static inline bool dquot_is_busy(struct dquot *dquot)
+{
+ if (test_bit(DQ_MOD_B, &dquot->dq_flags))
+ return true;
+ if (atomic_read(&dquot->dq_count) > 1)
+ return true;
+ return false;
+}
+
void dqput(struct dquot *dquot);
int dquot_scan_active(struct super_block *sb,
int (*fn)(struct dquot *dquot, unsigned long priv),