aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/quotaops.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/quotaops.h')
-rw-r--r--include/linux/quotaops.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/quotaops.h b/include/linux/quotaops.h
index 6965fe394c3b..1d3eee594cd6 100644
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -46,6 +46,14 @@ void inode_reclaim_rsv_space(struct inode *inode, qsize_t number);
46void dquot_initialize(struct inode *inode); 46void dquot_initialize(struct inode *inode);
47void dquot_drop(struct inode *inode); 47void dquot_drop(struct inode *inode);
48struct dquot *dqget(struct super_block *sb, struct kqid qid); 48struct dquot *dqget(struct super_block *sb, struct kqid qid);
49static inline struct dquot *dqgrab(struct dquot *dquot)
50{
51 /* Make sure someone else has active reference to dquot */
52 WARN_ON_ONCE(!atomic_read(&dquot->dq_count));
53 WARN_ON_ONCE(!test_bit(DQ_ACTIVE_B, &dquot->dq_flags));
54 atomic_inc(&dquot->dq_count);
55 return dquot;
56}
49void dqput(struct dquot *dquot); 57void dqput(struct dquot *dquot);
50int dquot_scan_active(struct super_block *sb, 58int dquot_scan_active(struct super_block *sb,
51 int (*fn)(struct dquot *dquot, unsigned long priv), 59 int (*fn)(struct dquot *dquot, unsigned long priv),