blob: 3e3a0d2874d986427ed21366cc0a49a9f28dcd7b [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Definitions for diskquota-operations. When diskquota is configured these
3 * macros expand to the right source-code.
4 *
5 * Author: Marco van Wieringen <mvw@planets.elm.net>
Linus Torvalds1da177e2005-04-16 15:20:36 -07006 */
7#ifndef _LINUX_QUOTAOPS_
8#define _LINUX_QUOTAOPS_
9
Linus Torvalds1da177e2005-04-16 15:20:36 -070010#include <linux/smp_lock.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070011#include <linux/fs.h>
12
Jan Kara03b06342008-07-25 01:46:52 -070013static inline struct quota_info *sb_dqopt(struct super_block *sb)
14{
15 return &sb->s_dquot;
16}
Jan Kara74abb982008-07-25 01:46:51 -070017
Linus Torvalds1da177e2005-04-16 15:20:36 -070018#if defined(CONFIG_QUOTA)
19
20/*
21 * declaration of quota_function calls in kernel.
22 */
Jan Karab85f4b82008-07-25 01:46:50 -070023void sync_dquots(struct super_block *sb, int type);
Linus Torvalds1da177e2005-04-16 15:20:36 -070024
Jan Karab85f4b82008-07-25 01:46:50 -070025int dquot_initialize(struct inode *inode, int type);
26int dquot_drop(struct inode *inode);
Jan Kara3d9ea252008-10-10 16:12:23 +020027struct dquot *dqget(struct super_block *sb, unsigned int id, int type);
28void dqput(struct dquot *dquot);
Jan Kara12c77522008-10-20 17:05:00 +020029int dquot_scan_active(struct super_block *sb,
30 int (*fn)(struct dquot *dquot, unsigned long priv),
31 unsigned long priv);
Jan Kara7d9056b2008-11-25 15:31:32 +010032struct dquot *dquot_alloc(struct super_block *sb, int type);
33void dquot_destroy(struct dquot *dquot);
Linus Torvalds1da177e2005-04-16 15:20:36 -070034
Jan Karab85f4b82008-07-25 01:46:50 -070035int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc);
Jan Kara12095462008-08-20 14:45:12 +020036int dquot_alloc_inode(const struct inode *inode, qsize_t number);
Linus Torvalds1da177e2005-04-16 15:20:36 -070037
Jan Karab85f4b82008-07-25 01:46:50 -070038int dquot_free_space(struct inode *inode, qsize_t number);
Jan Kara12095462008-08-20 14:45:12 +020039int dquot_free_inode(const struct inode *inode, qsize_t number);
Linus Torvalds1da177e2005-04-16 15:20:36 -070040
Jan Karab85f4b82008-07-25 01:46:50 -070041int dquot_transfer(struct inode *inode, struct iattr *iattr);
42int dquot_commit(struct dquot *dquot);
43int dquot_acquire(struct dquot *dquot);
44int dquot_release(struct dquot *dquot);
45int dquot_commit_info(struct super_block *sb, int type);
46int dquot_mark_dquot_dirty(struct dquot *dquot);
Linus Torvalds1da177e2005-04-16 15:20:36 -070047
Jan Karab85f4b82008-07-25 01:46:50 -070048int vfs_quota_on(struct super_block *sb, int type, int format_id,
49 char *path, int remount);
Jan Karaf55abc02008-08-20 17:50:32 +020050int vfs_quota_enable(struct inode *inode, int type, int format_id,
51 unsigned int flags);
Al Viro77e69da2008-08-01 04:29:18 -040052int vfs_quota_on_path(struct super_block *sb, int type, int format_id,
53 struct path *path);
Jan Karab85f4b82008-07-25 01:46:50 -070054int vfs_quota_on_mount(struct super_block *sb, char *qf_name,
55 int format_id, int type);
56int vfs_quota_off(struct super_block *sb, int type, int remount);
Jan Karaf55abc02008-08-20 17:50:32 +020057int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags);
Jan Karab85f4b82008-07-25 01:46:50 -070058int vfs_quota_sync(struct super_block *sb, int type);
59int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
60int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii);
61int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di);
62int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *di);
63
64void vfs_dq_drop(struct inode *inode);
65int vfs_dq_transfer(struct inode *inode, struct iattr *iattr);
66int vfs_dq_quota_on_remount(struct super_block *sb);
Linus Torvalds1da177e2005-04-16 15:20:36 -070067
Jan Kara03b06342008-07-25 01:46:52 -070068static inline struct mem_dqinfo *sb_dqinfo(struct super_block *sb, int type)
69{
70 return sb_dqopt(sb)->info + type;
71}
Jan Kara74abb982008-07-25 01:46:51 -070072
73/*
74 * Functions for checking status of quota
75 */
76
Jan Karaf55abc02008-08-20 17:50:32 +020077static inline int sb_has_quota_usage_enabled(struct super_block *sb, int type)
Jan Kara03b06342008-07-25 01:46:52 -070078{
Jan Karaf55abc02008-08-20 17:50:32 +020079 return sb_dqopt(sb)->flags &
80 dquot_state_flag(DQUOT_USAGE_ENABLED, type);
Jan Kara03b06342008-07-25 01:46:52 -070081}
Jan Kara74abb982008-07-25 01:46:51 -070082
Jan Karaf55abc02008-08-20 17:50:32 +020083static inline int sb_has_quota_limits_enabled(struct super_block *sb, int type)
Jan Kara03b06342008-07-25 01:46:52 -070084{
Jan Karaf55abc02008-08-20 17:50:32 +020085 return sb_dqopt(sb)->flags &
86 dquot_state_flag(DQUOT_LIMITS_ENABLED, type);
Jan Kara03b06342008-07-25 01:46:52 -070087}
Jan Kara74abb982008-07-25 01:46:51 -070088
Jan Kara03b06342008-07-25 01:46:52 -070089static inline int sb_has_quota_suspended(struct super_block *sb, int type)
90{
Jan Karaf55abc02008-08-20 17:50:32 +020091 return sb_dqopt(sb)->flags &
92 dquot_state_flag(DQUOT_SUSPENDED, type);
Jan Kara03b06342008-07-25 01:46:52 -070093}
Jan Kara74abb982008-07-25 01:46:51 -070094
Jan Kara03b06342008-07-25 01:46:52 -070095static inline int sb_any_quota_suspended(struct super_block *sb)
96{
97 return sb_has_quota_suspended(sb, USRQUOTA) ||
98 sb_has_quota_suspended(sb, GRPQUOTA);
99}
Jan Kara74abb982008-07-25 01:46:51 -0700100
Jan Karaf55abc02008-08-20 17:50:32 +0200101/* Does kernel know about any quota information for given sb + type? */
102static inline int sb_has_quota_loaded(struct super_block *sb, int type)
103{
104 /* Currently if anything is on, then quota usage is on as well */
105 return sb_has_quota_usage_enabled(sb, type);
106}
107
108static inline int sb_any_quota_loaded(struct super_block *sb)
109{
110 return sb_has_quota_loaded(sb, USRQUOTA) ||
111 sb_has_quota_loaded(sb, GRPQUOTA);
112}
113
114static inline int sb_has_quota_active(struct super_block *sb, int type)
115{
116 return sb_has_quota_loaded(sb, type) &&
117 !sb_has_quota_suspended(sb, type);
118}
119
120static inline int sb_any_quota_active(struct super_block *sb)
121{
122 return sb_has_quota_active(sb, USRQUOTA) ||
123 sb_has_quota_active(sb, GRPQUOTA);
124}
125
Linus Torvalds1da177e2005-04-16 15:20:36 -0700126/*
127 * Operations supported for diskquotas.
128 */
129extern struct dquot_operations dquot_operations;
130extern struct quotactl_ops vfs_quotactl_ops;
131
132#define sb_dquot_ops (&dquot_operations)
133#define sb_quotactl_ops (&vfs_quotactl_ops)
134
135/* It is better to call this function outside of any transaction as it might
136 * need a lot of space in journal for dquot structure allocation. */
Jan Karab85f4b82008-07-25 01:46:50 -0700137static inline void vfs_dq_init(struct inode *inode)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700138{
139 BUG_ON(!inode->i_sb);
Jan Karaf55abc02008-08-20 17:50:32 +0200140 if (sb_any_quota_active(inode->i_sb) && !IS_NOQUOTA(inode))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700141 inode->i_sb->dq_op->initialize(inode, -1);
142}
143
Linus Torvalds1da177e2005-04-16 15:20:36 -0700144/* The following allocation/freeing/transfer functions *must* be called inside
145 * a transaction (deadlocks possible otherwise) */
Jan Karab85f4b82008-07-25 01:46:50 -0700146static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700147{
Jan Karaf55abc02008-08-20 17:50:32 +0200148 if (sb_any_quota_active(inode->i_sb)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700149 /* Used space is updated in alloc_space() */
150 if (inode->i_sb->dq_op->alloc_space(inode, nr, 1) == NO_QUOTA)
151 return 1;
152 }
153 else
154 inode_add_bytes(inode, nr);
155 return 0;
156}
157
Jan Karab85f4b82008-07-25 01:46:50 -0700158static inline int vfs_dq_prealloc_space(struct inode *inode, qsize_t nr)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700159{
160 int ret;
Jan Karab85f4b82008-07-25 01:46:50 -0700161 if (!(ret = vfs_dq_prealloc_space_nodirty(inode, nr)))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700162 mark_inode_dirty(inode);
163 return ret;
164}
165
Jan Karab85f4b82008-07-25 01:46:50 -0700166static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700167{
Jan Karaf55abc02008-08-20 17:50:32 +0200168 if (sb_any_quota_active(inode->i_sb)) {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700169 /* Used space is updated in alloc_space() */
170 if (inode->i_sb->dq_op->alloc_space(inode, nr, 0) == NO_QUOTA)
171 return 1;
172 }
173 else
174 inode_add_bytes(inode, nr);
175 return 0;
176}
177
Jan Karab85f4b82008-07-25 01:46:50 -0700178static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700179{
180 int ret;
Jan Karab85f4b82008-07-25 01:46:50 -0700181 if (!(ret = vfs_dq_alloc_space_nodirty(inode, nr)))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700182 mark_inode_dirty(inode);
183 return ret;
184}
185
Mingming Caof18df222009-01-13 16:43:09 +0100186static inline int vfs_dq_reserve_space(struct inode *inode, qsize_t nr)
187{
188 if (sb_any_quota_active(inode->i_sb)) {
189 /* Used space is updated in alloc_space() */
190 if (inode->i_sb->dq_op->reserve_space(inode, nr, 0) == NO_QUOTA)
191 return 1;
192 }
193 return 0;
194}
195
Jan Karab85f4b82008-07-25 01:46:50 -0700196static inline int vfs_dq_alloc_inode(struct inode *inode)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700197{
Jan Karaf55abc02008-08-20 17:50:32 +0200198 if (sb_any_quota_active(inode->i_sb)) {
Jan Karab85f4b82008-07-25 01:46:50 -0700199 vfs_dq_init(inode);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700200 if (inode->i_sb->dq_op->alloc_inode(inode, 1) == NO_QUOTA)
201 return 1;
202 }
203 return 0;
204}
205
Jan Karab85f4b82008-07-25 01:46:50 -0700206static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700207{
Jan Karaf55abc02008-08-20 17:50:32 +0200208 if (sb_any_quota_active(inode->i_sb))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700209 inode->i_sb->dq_op->free_space(inode, nr);
210 else
211 inode_sub_bytes(inode, nr);
212}
213
Jan Karab85f4b82008-07-25 01:46:50 -0700214static inline void vfs_dq_free_space(struct inode *inode, qsize_t nr)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700215{
Jan Karab85f4b82008-07-25 01:46:50 -0700216 vfs_dq_free_space_nodirty(inode, nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700217 mark_inode_dirty(inode);
218}
219
Jan Karab85f4b82008-07-25 01:46:50 -0700220static inline void vfs_dq_free_inode(struct inode *inode)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700221{
Jan Karaf55abc02008-08-20 17:50:32 +0200222 if (sb_any_quota_active(inode->i_sb))
Linus Torvalds1da177e2005-04-16 15:20:36 -0700223 inode->i_sb->dq_op->free_inode(inode, 1);
224}
225
Linus Torvalds1da177e2005-04-16 15:20:36 -0700226/* The following two functions cannot be called inside a transaction */
Jan Karab85f4b82008-07-25 01:46:50 -0700227static inline void vfs_dq_sync(struct super_block *sb)
Jan Kara03f6e922008-04-28 02:14:32 -0700228{
229 sync_dquots(sb, -1);
230}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700231
Jan Karab85f4b82008-07-25 01:46:50 -0700232static inline int vfs_dq_off(struct super_block *sb, int remount)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700233{
234 int ret = -ENOSYS;
235
Jan Kara0ff5af82008-04-28 02:14:33 -0700236 if (sb->s_qcop && sb->s_qcop->quota_off)
237 ret = sb->s_qcop->quota_off(sb, -1, remount);
238 return ret;
239}
240
Linus Torvalds1da177e2005-04-16 15:20:36 -0700241#else
242
Jan Karaf55abc02008-08-20 17:50:32 +0200243static inline int sb_has_quota_usage_enabled(struct super_block *sb, int type)
Jan Kara03b06342008-07-25 01:46:52 -0700244{
245 return 0;
246}
247
Jan Karaf55abc02008-08-20 17:50:32 +0200248static inline int sb_has_quota_limits_enabled(struct super_block *sb, int type)
Jan Kara03b06342008-07-25 01:46:52 -0700249{
250 return 0;
251}
252
253static inline int sb_has_quota_suspended(struct super_block *sb, int type)
254{
255 return 0;
256}
257
258static inline int sb_any_quota_suspended(struct super_block *sb)
259{
260 return 0;
261}
Jan Kara74abb982008-07-25 01:46:51 -0700262
Jan Karaf55abc02008-08-20 17:50:32 +0200263/* Does kernel know about any quota information for given sb + type? */
264static inline int sb_has_quota_loaded(struct super_block *sb, int type)
265{
266 return 0;
267}
268
269static inline int sb_any_quota_loaded(struct super_block *sb)
270{
271 return 0;
272}
273
274static inline int sb_has_quota_active(struct super_block *sb, int type)
275{
276 return 0;
277}
278
279static inline int sb_any_quota_active(struct super_block *sb)
280{
281 return 0;
282}
283
Linus Torvalds1da177e2005-04-16 15:20:36 -0700284/*
285 * NO-OP when quota not configured.
286 */
287#define sb_dquot_ops (NULL)
288#define sb_quotactl_ops (NULL)
Andrew Morton50f8c372008-04-28 02:14:35 -0700289
Jan Karab85f4b82008-07-25 01:46:50 -0700290static inline void vfs_dq_init(struct inode *inode)
Andrew Morton50f8c372008-04-28 02:14:35 -0700291{
292}
293
Jan Karab85f4b82008-07-25 01:46:50 -0700294static inline void vfs_dq_drop(struct inode *inode)
Andrew Morton50f8c372008-04-28 02:14:35 -0700295{
296}
297
Jan Karab85f4b82008-07-25 01:46:50 -0700298static inline int vfs_dq_alloc_inode(struct inode *inode)
Andrew Morton50f8c372008-04-28 02:14:35 -0700299{
300 return 0;
301}
302
Jan Karab85f4b82008-07-25 01:46:50 -0700303static inline void vfs_dq_free_inode(struct inode *inode)
Andrew Morton50f8c372008-04-28 02:14:35 -0700304{
305}
306
Jan Karab85f4b82008-07-25 01:46:50 -0700307static inline void vfs_dq_sync(struct super_block *sb)
Andrew Morton50f8c372008-04-28 02:14:35 -0700308{
309}
310
Jan Karab85f4b82008-07-25 01:46:50 -0700311static inline int vfs_dq_off(struct super_block *sb, int remount)
Andrew Morton50f8c372008-04-28 02:14:35 -0700312{
313 return 0;
314}
315
Jan Karab85f4b82008-07-25 01:46:50 -0700316static inline int vfs_dq_quota_on_remount(struct super_block *sb)
Andrew Morton50f8c372008-04-28 02:14:35 -0700317{
318 return 0;
319}
320
Jan Karab85f4b82008-07-25 01:46:50 -0700321static inline int vfs_dq_transfer(struct inode *inode, struct iattr *iattr)
Andrew Morton50f8c372008-04-28 02:14:35 -0700322{
323 return 0;
324}
325
Jan Karab85f4b82008-07-25 01:46:50 -0700326static inline int vfs_dq_prealloc_space_nodirty(struct inode *inode, qsize_t nr)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700327{
328 inode_add_bytes(inode, nr);
329 return 0;
330}
331
Jan Karab85f4b82008-07-25 01:46:50 -0700332static inline int vfs_dq_prealloc_space(struct inode *inode, qsize_t nr)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700333{
Jan Karab85f4b82008-07-25 01:46:50 -0700334 vfs_dq_prealloc_space_nodirty(inode, nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700335 mark_inode_dirty(inode);
336 return 0;
337}
338
Jan Karab85f4b82008-07-25 01:46:50 -0700339static inline int vfs_dq_alloc_space_nodirty(struct inode *inode, qsize_t nr)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700340{
341 inode_add_bytes(inode, nr);
342 return 0;
343}
344
Jan Karab85f4b82008-07-25 01:46:50 -0700345static inline int vfs_dq_alloc_space(struct inode *inode, qsize_t nr)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700346{
Jan Karab85f4b82008-07-25 01:46:50 -0700347 vfs_dq_alloc_space_nodirty(inode, nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700348 mark_inode_dirty(inode);
349 return 0;
350}
351
Mingming Caof18df222009-01-13 16:43:09 +0100352static inline int vfs_dq_reserve_space(struct inode *inode, qsize_t nr)
353{
354 return 0;
355}
356
Jan Karab85f4b82008-07-25 01:46:50 -0700357static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700358{
359 inode_sub_bytes(inode, nr);
360}
361
Jan Karab85f4b82008-07-25 01:46:50 -0700362static inline void vfs_dq_free_space(struct inode *inode, qsize_t nr)
Linus Torvalds1da177e2005-04-16 15:20:36 -0700363{
Jan Karab85f4b82008-07-25 01:46:50 -0700364 vfs_dq_free_space_nodirty(inode, nr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700365 mark_inode_dirty(inode);
366}
367
368#endif /* CONFIG_QUOTA */
369
Jan Karab85f4b82008-07-25 01:46:50 -0700370static inline int vfs_dq_prealloc_block_nodirty(struct inode *inode, qsize_t nr)
Jan Kara03f6e922008-04-28 02:14:32 -0700371{
Jan Karab85f4b82008-07-25 01:46:50 -0700372 return vfs_dq_prealloc_space_nodirty(inode,
Jan Kara03f6e922008-04-28 02:14:32 -0700373 nr << inode->i_sb->s_blocksize_bits);
374}
375
Jan Karab85f4b82008-07-25 01:46:50 -0700376static inline int vfs_dq_prealloc_block(struct inode *inode, qsize_t nr)
Jan Kara03f6e922008-04-28 02:14:32 -0700377{
Jan Karab85f4b82008-07-25 01:46:50 -0700378 return vfs_dq_prealloc_space(inode,
Jan Kara03f6e922008-04-28 02:14:32 -0700379 nr << inode->i_sb->s_blocksize_bits);
380}
381
Jan Karab85f4b82008-07-25 01:46:50 -0700382static inline int vfs_dq_alloc_block_nodirty(struct inode *inode, qsize_t nr)
Jan Kara03f6e922008-04-28 02:14:32 -0700383{
Jan Karab85f4b82008-07-25 01:46:50 -0700384 return vfs_dq_alloc_space_nodirty(inode,
Jan Kara03f6e922008-04-28 02:14:32 -0700385 nr << inode->i_sb->s_blocksize_bits);
386}
387
Jan Karab85f4b82008-07-25 01:46:50 -0700388static inline int vfs_dq_alloc_block(struct inode *inode, qsize_t nr)
Jan Kara03f6e922008-04-28 02:14:32 -0700389{
Jan Karab85f4b82008-07-25 01:46:50 -0700390 return vfs_dq_alloc_space(inode,
Jan Kara03f6e922008-04-28 02:14:32 -0700391 nr << inode->i_sb->s_blocksize_bits);
392}
393
Mingming Caof18df222009-01-13 16:43:09 +0100394static inline int vfs_dq_reserve_block(struct inode *inode, qsize_t nr)
395{
396 return vfs_dq_reserve_space(inode,
397 nr << inode->i_blkbits);
398}
399
Jan Karab85f4b82008-07-25 01:46:50 -0700400static inline void vfs_dq_free_block_nodirty(struct inode *inode, qsize_t nr)
Jan Kara03f6e922008-04-28 02:14:32 -0700401{
Jan Karab85f4b82008-07-25 01:46:50 -0700402 vfs_dq_free_space_nodirty(inode, nr << inode->i_sb->s_blocksize_bits);
Jan Kara03f6e922008-04-28 02:14:32 -0700403}
404
Jan Karab85f4b82008-07-25 01:46:50 -0700405static inline void vfs_dq_free_block(struct inode *inode, qsize_t nr)
Jan Kara03f6e922008-04-28 02:14:32 -0700406{
Jan Karab85f4b82008-07-25 01:46:50 -0700407 vfs_dq_free_space(inode, nr << inode->i_sb->s_blocksize_bits);
Jan Kara03f6e922008-04-28 02:14:32 -0700408}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700409
Jan Karab85f4b82008-07-25 01:46:50 -0700410/*
411 * Define uppercase equivalents for compatibility with old function names
412 * Can go away when we think all users have been converted (15/04/2008)
413 */
414#define DQUOT_INIT(inode) vfs_dq_init(inode)
415#define DQUOT_DROP(inode) vfs_dq_drop(inode)
416#define DQUOT_PREALLOC_SPACE_NODIRTY(inode, nr) \
417 vfs_dq_prealloc_space_nodirty(inode, nr)
418#define DQUOT_PREALLOC_SPACE(inode, nr) vfs_dq_prealloc_space(inode, nr)
419#define DQUOT_ALLOC_SPACE_NODIRTY(inode, nr) \
420 vfs_dq_alloc_space_nodirty(inode, nr)
421#define DQUOT_ALLOC_SPACE(inode, nr) vfs_dq_alloc_space(inode, nr)
422#define DQUOT_PREALLOC_BLOCK_NODIRTY(inode, nr) \
423 vfs_dq_prealloc_block_nodirty(inode, nr)
424#define DQUOT_PREALLOC_BLOCK(inode, nr) vfs_dq_prealloc_block(inode, nr)
425#define DQUOT_ALLOC_BLOCK_NODIRTY(inode, nr) \
426 vfs_dq_alloc_block_nodirty(inode, nr)
427#define DQUOT_ALLOC_BLOCK(inode, nr) vfs_dq_alloc_block(inode, nr)
428#define DQUOT_ALLOC_INODE(inode) vfs_dq_alloc_inode(inode)
429#define DQUOT_FREE_SPACE_NODIRTY(inode, nr) \
430 vfs_dq_free_space_nodirty(inode, nr)
431#define DQUOT_FREE_SPACE(inode, nr) vfs_dq_free_space(inode, nr)
432#define DQUOT_FREE_BLOCK_NODIRTY(inode, nr) \
433 vfs_dq_free_block_nodirty(inode, nr)
434#define DQUOT_FREE_BLOCK(inode, nr) vfs_dq_free_block(inode, nr)
435#define DQUOT_FREE_INODE(inode) vfs_dq_free_inode(inode)
436#define DQUOT_TRANSFER(inode, iattr) vfs_dq_transfer(inode, iattr)
437#define DQUOT_SYNC(sb) vfs_dq_sync(sb)
438#define DQUOT_OFF(sb, remount) vfs_dq_off(sb, remount)
439#define DQUOT_ON_REMOUNT(sb) vfs_dq_quota_on_remount(sb)
440
Linus Torvalds1da177e2005-04-16 15:20:36 -0700441#endif /* _LINUX_QUOTAOPS_ */