aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/quota.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2010-03-03 09:05:00 -0500
committerJan Kara <jack@suse.cz>2010-03-04 18:20:28 -0500
commit5dd4056db84387975140ff2568eaa0406f07985e (patch)
tree03c26d7f6e3367b167bfeeb1a01654c6619573f4 /include/linux/quota.h
parent49792c806d0bfd53afc789dcdf50dc9bed2c5b83 (diff)
dquot: cleanup space allocation / freeing routines
Get rid of the alloc_space, free_space, reserve_space, claim_space and release_rsv dquot operations - they are always called from the filesystem and if a filesystem really needs their own (which none currently does) it can just call into it's own routine directly. Move shared logic into the common __dquot_alloc_space, dquot_claim_space_nodirty and __dquot_free_space low-level methods, and rationalize the wrappers around it to move as much as possible code into the common block for CONFIG_QUOTA vs not. Also rename all these helpers to be named dquot_* instead of vfs_dq_*. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'include/linux/quota.h')
-rw-r--r--include/linux/quota.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/include/linux/quota.h b/include/linux/quota.h
index edf34f2fe87d..1b14ad287fe3 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -297,9 +297,7 @@ struct quota_format_ops {
297struct dquot_operations { 297struct dquot_operations {
298 int (*initialize) (struct inode *, int); 298 int (*initialize) (struct inode *, int);
299 int (*drop) (struct inode *); 299 int (*drop) (struct inode *);
300 int (*alloc_space) (struct inode *, qsize_t, int);
301 int (*alloc_inode) (const struct inode *, qsize_t); 300 int (*alloc_inode) (const struct inode *, qsize_t);
302 int (*free_space) (struct inode *, qsize_t);
303 int (*free_inode) (const struct inode *, qsize_t); 301 int (*free_inode) (const struct inode *, qsize_t);
304 int (*transfer) (struct inode *, qid_t *, unsigned long); 302 int (*transfer) (struct inode *, qid_t *, unsigned long);
305 int (*write_dquot) (struct dquot *); /* Ordinary dquot write */ 303 int (*write_dquot) (struct dquot *); /* Ordinary dquot write */
@@ -309,12 +307,6 @@ struct dquot_operations {
309 int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */ 307 int (*release_dquot) (struct dquot *); /* Quota is going to be deleted from disk */
310 int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */ 308 int (*mark_dirty) (struct dquot *); /* Dquot is marked dirty */
311 int (*write_info) (struct super_block *, int); /* Write of quota "superblock" */ 309 int (*write_info) (struct super_block *, int); /* Write of quota "superblock" */
312 /* reserve quota for delayed block allocation */
313 int (*reserve_space) (struct inode *, qsize_t, int);
314 /* claim reserved quota for delayed alloc */
315 int (*claim_space) (struct inode *, qsize_t);
316 /* release rsved quota for delayed alloc */
317 void (*release_rsv) (struct inode *, qsize_t);
318 /* get reserved quota for delayed alloc, value returned is managed by 310 /* get reserved quota for delayed alloc, value returned is managed by
319 * quota code only */ 311 * quota code only */
320 qsize_t *(*get_reserved_space) (struct inode *); 312 qsize_t *(*get_reserved_space) (struct inode *);