Commit 7d9056ba20ebed6e3937a2e23183f6117919cb00
Committed by
Mark Fasheh
1 parent
5cd9d5bb86
Exists in
master
and in
7 other branches
quota: Export dquot_alloc() and dquot_destroy() functions
These are default functions for creating and destroying quota structures and they should be used from filesystems. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Showing 2 changed files with 6 additions and 2 deletions Side-by-side Diff
fs/dquot.c
... | ... | @@ -413,10 +413,11 @@ |
413 | 413 | return ret; |
414 | 414 | } |
415 | 415 | |
416 | -static void dquot_destroy(struct dquot *dquot) | |
416 | +void dquot_destroy(struct dquot *dquot) | |
417 | 417 | { |
418 | 418 | kmem_cache_free(dquot_cachep, dquot); |
419 | 419 | } |
420 | +EXPORT_SYMBOL(dquot_destroy); | |
420 | 421 | |
421 | 422 | static inline void do_destroy_dquot(struct dquot *dquot) |
422 | 423 | { |
423 | 424 | |
... | ... | @@ -668,10 +669,11 @@ |
668 | 669 | spin_unlock(&dq_list_lock); |
669 | 670 | } |
670 | 671 | |
671 | -static struct dquot *dquot_alloc(struct super_block *sb, int type) | |
672 | +struct dquot *dquot_alloc(struct super_block *sb, int type) | |
672 | 673 | { |
673 | 674 | return kmem_cache_zalloc(dquot_cachep, GFP_NOFS); |
674 | 675 | } |
676 | +EXPORT_SYMBOL(dquot_alloc); | |
675 | 677 | |
676 | 678 | static struct dquot *get_empty_dquot(struct super_block *sb, int type) |
677 | 679 | { |
include/linux/quotaops.h
... | ... | @@ -31,6 +31,8 @@ |
31 | 31 | int dquot_scan_active(struct super_block *sb, |
32 | 32 | int (*fn)(struct dquot *dquot, unsigned long priv), |
33 | 33 | unsigned long priv); |
34 | +struct dquot *dquot_alloc(struct super_block *sb, int type); | |
35 | +void dquot_destroy(struct dquot *dquot); | |
34 | 36 | |
35 | 37 | int dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc); |
36 | 38 | int dquot_alloc_inode(const struct inode *inode, qsize_t number); |