Loading fs/dquot.c +33 −36 Original line number Diff line number Diff line Loading @@ -132,6 +132,7 @@ static DEFINE_SPINLOCK(dq_list_lock); static DEFINE_SPINLOCK(dq_state_lock); DEFINE_SPINLOCK(dq_data_lock); EXPORT_SYMBOL(dq_data_lock); static char *quotatypes[] = INITQFNAMES; static struct quota_format_type *quota_formats; /* List of registered formats */ Loading @@ -148,6 +149,7 @@ int register_quota_format(struct quota_format_type *fmt) spin_unlock(&dq_list_lock); return 0; } EXPORT_SYMBOL(register_quota_format); void unregister_quota_format(struct quota_format_type *fmt) { Loading @@ -159,6 +161,7 @@ void unregister_quota_format(struct quota_format_type *fmt) *actqf = (*actqf)->qf_next; spin_unlock(&dq_list_lock); } EXPORT_SYMBOL(unregister_quota_format); static struct quota_format_type *find_quota_format(int id) { Loading Loading @@ -215,6 +218,7 @@ static unsigned int dq_hash_bits, dq_hash_mask; static struct hlist_head *dquot_hash; struct dqstats dqstats; EXPORT_SYMBOL(dqstats); static inline unsigned int hashfn(const struct super_block *sb, unsigned int id, int type) Loading Loading @@ -309,6 +313,7 @@ int dquot_mark_dquot_dirty(struct dquot *dquot) spin_unlock(&dq_list_lock); return 0; } EXPORT_SYMBOL(dquot_mark_dquot_dirty); /* This function needs dq_list_lock */ static inline int clear_dquot_dirty(struct dquot *dquot) Loading Loading @@ -360,6 +365,7 @@ int dquot_acquire(struct dquot *dquot) mutex_unlock(&dquot->dq_lock); return ret; } EXPORT_SYMBOL(dquot_acquire); /* * Write dquot to disk Loading Loading @@ -389,6 +395,7 @@ int dquot_commit(struct dquot *dquot) mutex_unlock(&dqopt->dqio_mutex); return ret; } EXPORT_SYMBOL(dquot_commit); /* * Release dquot Loading Loading @@ -417,6 +424,7 @@ int dquot_release(struct dquot *dquot) mutex_unlock(&dquot->dq_lock); return ret; } EXPORT_SYMBOL(dquot_release); void dquot_destroy(struct dquot *dquot) { Loading Loading @@ -516,6 +524,7 @@ int dquot_scan_active(struct super_block *sb, mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex); return ret; } EXPORT_SYMBOL(dquot_scan_active); int vfs_quota_sync(struct super_block *sb, int type) { Loading Loading @@ -563,6 +572,7 @@ int vfs_quota_sync(struct super_block *sb, int type) return 0; } EXPORT_SYMBOL(vfs_quota_sync); /* Free unused dquots from cache */ static void prune_dqcache(int count) Loading Loading @@ -672,6 +682,7 @@ void dqput(struct dquot *dquot) put_dquot_last(dquot); spin_unlock(&dq_list_lock); } EXPORT_SYMBOL(dqput); struct dquot *dquot_alloc(struct super_block *sb, int type) { Loading Loading @@ -767,6 +778,7 @@ struct dquot *dqget(struct super_block *sb, unsigned int id, int type) return dquot; } EXPORT_SYMBOL(dqget); static int dqinit_needed(struct inode *inode, int type) { Loading Loading @@ -1282,6 +1294,7 @@ int dquot_initialize(struct inode *inode, int type) dqput(got[cnt]); return ret; } EXPORT_SYMBOL(dquot_initialize); /* * Release all quotas referenced by inode Loading @@ -1302,6 +1315,7 @@ int dquot_drop(struct inode *inode) dqput(put[cnt]); return 0; } EXPORT_SYMBOL(dquot_drop); /* Wrapper to remove references to quota structures from inode */ void vfs_dq_drop(struct inode *inode) Loading @@ -1324,6 +1338,7 @@ void vfs_dq_drop(struct inode *inode) inode->i_sb->dq_op->drop(inode); } } EXPORT_SYMBOL(vfs_dq_drop); /* * Following four functions update i_blocks+i_bytes fields and Loading Loading @@ -1404,6 +1419,7 @@ int dquot_alloc_space(struct inode *inode, qsize_t number, int warn) out: return ret; } EXPORT_SYMBOL(dquot_alloc_space); int dquot_reserve_space(struct inode *inode, qsize_t number, int warn) { Loading Loading @@ -1468,6 +1484,7 @@ int dquot_alloc_inode(const struct inode *inode, qsize_t number) up_read(&sb_dqopt(inode->i_sb)->dqptr_sem); return ret; } EXPORT_SYMBOL(dquot_alloc_inode); int dquot_claim_space(struct inode *inode, qsize_t number) { Loading Loading @@ -1574,6 +1591,7 @@ int dquot_free_space(struct inode *inode, qsize_t number) up_read(&sb_dqopt(inode->i_sb)->dqptr_sem); return QUOTA_OK; } EXPORT_SYMBOL(dquot_free_space); /* * This operation can block, but only after everything is updated Loading Loading @@ -1610,6 +1628,7 @@ int dquot_free_inode(const struct inode *inode, qsize_t number) up_read(&sb_dqopt(inode->i_sb)->dqptr_sem); return QUOTA_OK; } EXPORT_SYMBOL(dquot_free_inode); /* * call back function, get reserved quota space from underlying fs Loading Loading @@ -1746,6 +1765,7 @@ int dquot_transfer(struct inode *inode, struct iattr *iattr) ret = NO_QUOTA; goto warn_put_all; } EXPORT_SYMBOL(dquot_transfer); /* Wrapper for transferring ownership of an inode */ int vfs_dq_transfer(struct inode *inode, struct iattr *iattr) Loading @@ -1757,7 +1777,7 @@ int vfs_dq_transfer(struct inode *inode, struct iattr *iattr) } return 0; } EXPORT_SYMBOL(vfs_dq_transfer); /* * Write info of quota file to disk Loading @@ -1772,6 +1792,7 @@ int dquot_commit_info(struct super_block *sb, int type) mutex_unlock(&dqopt->dqio_mutex); return ret; } EXPORT_SYMBOL(dquot_commit_info); /* * Definitions of diskquota operations. Loading Loading @@ -1924,13 +1945,14 @@ int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags) } return ret; } EXPORT_SYMBOL(vfs_quota_disable); int vfs_quota_off(struct super_block *sb, int type, int remount) { return vfs_quota_disable(sb, type, remount ? DQUOT_SUSPENDED : (DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED)); } EXPORT_SYMBOL(vfs_quota_off); /* * Turn quotas on on a device */ Loading Loading @@ -2087,6 +2109,7 @@ int vfs_quota_on_path(struct super_block *sb, int type, int format_id, DQUOT_LIMITS_ENABLED); return error; } EXPORT_SYMBOL(vfs_quota_on_path); int vfs_quota_on(struct super_block *sb, int type, int format_id, char *name, int remount) Loading @@ -2104,6 +2127,7 @@ int vfs_quota_on(struct super_block *sb, int type, int format_id, char *name, } return error; } EXPORT_SYMBOL(vfs_quota_on); /* * More powerful function for turning on quotas allowing setting Loading Loading @@ -2150,6 +2174,7 @@ int vfs_quota_enable(struct inode *inode, int type, int format_id, load_quota: return vfs_load_quota_inode(inode, type, format_id, flags); } EXPORT_SYMBOL(vfs_quota_enable); /* * This function is used when filesystem needs to initialize quotas Loading Loading @@ -2179,6 +2204,7 @@ int vfs_quota_on_mount(struct super_block *sb, char *qf_name, dput(dentry); return error; } EXPORT_SYMBOL(vfs_quota_on_mount); /* Wrapper to turn on quotas when remounting rw */ int vfs_dq_quota_on_remount(struct super_block *sb) Loading @@ -2195,6 +2221,7 @@ int vfs_dq_quota_on_remount(struct super_block *sb) } return ret; } EXPORT_SYMBOL(vfs_dq_quota_on_remount); static inline qsize_t qbtos(qsize_t blocks) { Loading Loading @@ -2236,6 +2263,7 @@ int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *d return 0; } EXPORT_SYMBOL(vfs_get_dqblk); /* Generic routine for setting common part of quota structure */ static int do_set_dqblk(struct dquot *dquot, struct if_dqblk *di) Loading Loading @@ -2327,6 +2355,7 @@ int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *d out: return rc; } EXPORT_SYMBOL(vfs_set_dqblk); /* Generic routine for getting common part of quota file information */ int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) Loading @@ -2348,6 +2377,7 @@ int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex); return 0; } EXPORT_SYMBOL(vfs_get_dqinfo); /* Generic routine for setting common part of quota file information */ int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) Loading Loading @@ -2376,6 +2406,7 @@ int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex); return err; } EXPORT_SYMBOL(vfs_set_dqinfo); struct quotactl_ops vfs_quotactl_ops = { .quota_on = vfs_quota_on, Loading Loading @@ -2531,37 +2562,3 @@ static int __init dquot_init(void) return 0; } module_init(dquot_init); EXPORT_SYMBOL(register_quota_format); EXPORT_SYMBOL(unregister_quota_format); EXPORT_SYMBOL(dqstats); EXPORT_SYMBOL(dq_data_lock); EXPORT_SYMBOL(vfs_quota_enable); EXPORT_SYMBOL(vfs_quota_on); EXPORT_SYMBOL(vfs_quota_on_path); EXPORT_SYMBOL(vfs_quota_on_mount); EXPORT_SYMBOL(vfs_quota_disable); EXPORT_SYMBOL(vfs_quota_off); EXPORT_SYMBOL(dquot_scan_active); EXPORT_SYMBOL(vfs_quota_sync); EXPORT_SYMBOL(vfs_get_dqinfo); EXPORT_SYMBOL(vfs_set_dqinfo); EXPORT_SYMBOL(vfs_get_dqblk); EXPORT_SYMBOL(vfs_set_dqblk); EXPORT_SYMBOL(dquot_commit); EXPORT_SYMBOL(dquot_commit_info); EXPORT_SYMBOL(dquot_acquire); EXPORT_SYMBOL(dquot_release); EXPORT_SYMBOL(dquot_mark_dquot_dirty); EXPORT_SYMBOL(dquot_initialize); EXPORT_SYMBOL(dquot_drop); EXPORT_SYMBOL(vfs_dq_drop); EXPORT_SYMBOL(dqget); EXPORT_SYMBOL(dqput); EXPORT_SYMBOL(dquot_alloc_space); EXPORT_SYMBOL(dquot_alloc_inode); EXPORT_SYMBOL(dquot_free_space); EXPORT_SYMBOL(dquot_free_inode); EXPORT_SYMBOL(dquot_transfer); EXPORT_SYMBOL(vfs_dq_transfer); EXPORT_SYMBOL(vfs_dq_quota_on_remount); Loading
fs/dquot.c +33 −36 Original line number Diff line number Diff line Loading @@ -132,6 +132,7 @@ static DEFINE_SPINLOCK(dq_list_lock); static DEFINE_SPINLOCK(dq_state_lock); DEFINE_SPINLOCK(dq_data_lock); EXPORT_SYMBOL(dq_data_lock); static char *quotatypes[] = INITQFNAMES; static struct quota_format_type *quota_formats; /* List of registered formats */ Loading @@ -148,6 +149,7 @@ int register_quota_format(struct quota_format_type *fmt) spin_unlock(&dq_list_lock); return 0; } EXPORT_SYMBOL(register_quota_format); void unregister_quota_format(struct quota_format_type *fmt) { Loading @@ -159,6 +161,7 @@ void unregister_quota_format(struct quota_format_type *fmt) *actqf = (*actqf)->qf_next; spin_unlock(&dq_list_lock); } EXPORT_SYMBOL(unregister_quota_format); static struct quota_format_type *find_quota_format(int id) { Loading Loading @@ -215,6 +218,7 @@ static unsigned int dq_hash_bits, dq_hash_mask; static struct hlist_head *dquot_hash; struct dqstats dqstats; EXPORT_SYMBOL(dqstats); static inline unsigned int hashfn(const struct super_block *sb, unsigned int id, int type) Loading Loading @@ -309,6 +313,7 @@ int dquot_mark_dquot_dirty(struct dquot *dquot) spin_unlock(&dq_list_lock); return 0; } EXPORT_SYMBOL(dquot_mark_dquot_dirty); /* This function needs dq_list_lock */ static inline int clear_dquot_dirty(struct dquot *dquot) Loading Loading @@ -360,6 +365,7 @@ int dquot_acquire(struct dquot *dquot) mutex_unlock(&dquot->dq_lock); return ret; } EXPORT_SYMBOL(dquot_acquire); /* * Write dquot to disk Loading Loading @@ -389,6 +395,7 @@ int dquot_commit(struct dquot *dquot) mutex_unlock(&dqopt->dqio_mutex); return ret; } EXPORT_SYMBOL(dquot_commit); /* * Release dquot Loading Loading @@ -417,6 +424,7 @@ int dquot_release(struct dquot *dquot) mutex_unlock(&dquot->dq_lock); return ret; } EXPORT_SYMBOL(dquot_release); void dquot_destroy(struct dquot *dquot) { Loading Loading @@ -516,6 +524,7 @@ int dquot_scan_active(struct super_block *sb, mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex); return ret; } EXPORT_SYMBOL(dquot_scan_active); int vfs_quota_sync(struct super_block *sb, int type) { Loading Loading @@ -563,6 +572,7 @@ int vfs_quota_sync(struct super_block *sb, int type) return 0; } EXPORT_SYMBOL(vfs_quota_sync); /* Free unused dquots from cache */ static void prune_dqcache(int count) Loading Loading @@ -672,6 +682,7 @@ void dqput(struct dquot *dquot) put_dquot_last(dquot); spin_unlock(&dq_list_lock); } EXPORT_SYMBOL(dqput); struct dquot *dquot_alloc(struct super_block *sb, int type) { Loading Loading @@ -767,6 +778,7 @@ struct dquot *dqget(struct super_block *sb, unsigned int id, int type) return dquot; } EXPORT_SYMBOL(dqget); static int dqinit_needed(struct inode *inode, int type) { Loading Loading @@ -1282,6 +1294,7 @@ int dquot_initialize(struct inode *inode, int type) dqput(got[cnt]); return ret; } EXPORT_SYMBOL(dquot_initialize); /* * Release all quotas referenced by inode Loading @@ -1302,6 +1315,7 @@ int dquot_drop(struct inode *inode) dqput(put[cnt]); return 0; } EXPORT_SYMBOL(dquot_drop); /* Wrapper to remove references to quota structures from inode */ void vfs_dq_drop(struct inode *inode) Loading @@ -1324,6 +1338,7 @@ void vfs_dq_drop(struct inode *inode) inode->i_sb->dq_op->drop(inode); } } EXPORT_SYMBOL(vfs_dq_drop); /* * Following four functions update i_blocks+i_bytes fields and Loading Loading @@ -1404,6 +1419,7 @@ int dquot_alloc_space(struct inode *inode, qsize_t number, int warn) out: return ret; } EXPORT_SYMBOL(dquot_alloc_space); int dquot_reserve_space(struct inode *inode, qsize_t number, int warn) { Loading Loading @@ -1468,6 +1484,7 @@ int dquot_alloc_inode(const struct inode *inode, qsize_t number) up_read(&sb_dqopt(inode->i_sb)->dqptr_sem); return ret; } EXPORT_SYMBOL(dquot_alloc_inode); int dquot_claim_space(struct inode *inode, qsize_t number) { Loading Loading @@ -1574,6 +1591,7 @@ int dquot_free_space(struct inode *inode, qsize_t number) up_read(&sb_dqopt(inode->i_sb)->dqptr_sem); return QUOTA_OK; } EXPORT_SYMBOL(dquot_free_space); /* * This operation can block, but only after everything is updated Loading Loading @@ -1610,6 +1628,7 @@ int dquot_free_inode(const struct inode *inode, qsize_t number) up_read(&sb_dqopt(inode->i_sb)->dqptr_sem); return QUOTA_OK; } EXPORT_SYMBOL(dquot_free_inode); /* * call back function, get reserved quota space from underlying fs Loading Loading @@ -1746,6 +1765,7 @@ int dquot_transfer(struct inode *inode, struct iattr *iattr) ret = NO_QUOTA; goto warn_put_all; } EXPORT_SYMBOL(dquot_transfer); /* Wrapper for transferring ownership of an inode */ int vfs_dq_transfer(struct inode *inode, struct iattr *iattr) Loading @@ -1757,7 +1777,7 @@ int vfs_dq_transfer(struct inode *inode, struct iattr *iattr) } return 0; } EXPORT_SYMBOL(vfs_dq_transfer); /* * Write info of quota file to disk Loading @@ -1772,6 +1792,7 @@ int dquot_commit_info(struct super_block *sb, int type) mutex_unlock(&dqopt->dqio_mutex); return ret; } EXPORT_SYMBOL(dquot_commit_info); /* * Definitions of diskquota operations. Loading Loading @@ -1924,13 +1945,14 @@ int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags) } return ret; } EXPORT_SYMBOL(vfs_quota_disable); int vfs_quota_off(struct super_block *sb, int type, int remount) { return vfs_quota_disable(sb, type, remount ? DQUOT_SUSPENDED : (DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED)); } EXPORT_SYMBOL(vfs_quota_off); /* * Turn quotas on on a device */ Loading Loading @@ -2087,6 +2109,7 @@ int vfs_quota_on_path(struct super_block *sb, int type, int format_id, DQUOT_LIMITS_ENABLED); return error; } EXPORT_SYMBOL(vfs_quota_on_path); int vfs_quota_on(struct super_block *sb, int type, int format_id, char *name, int remount) Loading @@ -2104,6 +2127,7 @@ int vfs_quota_on(struct super_block *sb, int type, int format_id, char *name, } return error; } EXPORT_SYMBOL(vfs_quota_on); /* * More powerful function for turning on quotas allowing setting Loading Loading @@ -2150,6 +2174,7 @@ int vfs_quota_enable(struct inode *inode, int type, int format_id, load_quota: return vfs_load_quota_inode(inode, type, format_id, flags); } EXPORT_SYMBOL(vfs_quota_enable); /* * This function is used when filesystem needs to initialize quotas Loading Loading @@ -2179,6 +2204,7 @@ int vfs_quota_on_mount(struct super_block *sb, char *qf_name, dput(dentry); return error; } EXPORT_SYMBOL(vfs_quota_on_mount); /* Wrapper to turn on quotas when remounting rw */ int vfs_dq_quota_on_remount(struct super_block *sb) Loading @@ -2195,6 +2221,7 @@ int vfs_dq_quota_on_remount(struct super_block *sb) } return ret; } EXPORT_SYMBOL(vfs_dq_quota_on_remount); static inline qsize_t qbtos(qsize_t blocks) { Loading Loading @@ -2236,6 +2263,7 @@ int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *d return 0; } EXPORT_SYMBOL(vfs_get_dqblk); /* Generic routine for setting common part of quota structure */ static int do_set_dqblk(struct dquot *dquot, struct if_dqblk *di) Loading Loading @@ -2327,6 +2355,7 @@ int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *d out: return rc; } EXPORT_SYMBOL(vfs_set_dqblk); /* Generic routine for getting common part of quota file information */ int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) Loading @@ -2348,6 +2377,7 @@ int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex); return 0; } EXPORT_SYMBOL(vfs_get_dqinfo); /* Generic routine for setting common part of quota file information */ int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) Loading Loading @@ -2376,6 +2406,7 @@ int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex); return err; } EXPORT_SYMBOL(vfs_set_dqinfo); struct quotactl_ops vfs_quotactl_ops = { .quota_on = vfs_quota_on, Loading Loading @@ -2531,37 +2562,3 @@ static int __init dquot_init(void) return 0; } module_init(dquot_init); EXPORT_SYMBOL(register_quota_format); EXPORT_SYMBOL(unregister_quota_format); EXPORT_SYMBOL(dqstats); EXPORT_SYMBOL(dq_data_lock); EXPORT_SYMBOL(vfs_quota_enable); EXPORT_SYMBOL(vfs_quota_on); EXPORT_SYMBOL(vfs_quota_on_path); EXPORT_SYMBOL(vfs_quota_on_mount); EXPORT_SYMBOL(vfs_quota_disable); EXPORT_SYMBOL(vfs_quota_off); EXPORT_SYMBOL(dquot_scan_active); EXPORT_SYMBOL(vfs_quota_sync); EXPORT_SYMBOL(vfs_get_dqinfo); EXPORT_SYMBOL(vfs_set_dqinfo); EXPORT_SYMBOL(vfs_get_dqblk); EXPORT_SYMBOL(vfs_set_dqblk); EXPORT_SYMBOL(dquot_commit); EXPORT_SYMBOL(dquot_commit_info); EXPORT_SYMBOL(dquot_acquire); EXPORT_SYMBOL(dquot_release); EXPORT_SYMBOL(dquot_mark_dquot_dirty); EXPORT_SYMBOL(dquot_initialize); EXPORT_SYMBOL(dquot_drop); EXPORT_SYMBOL(vfs_dq_drop); EXPORT_SYMBOL(dqget); EXPORT_SYMBOL(dqput); EXPORT_SYMBOL(dquot_alloc_space); EXPORT_SYMBOL(dquot_alloc_inode); EXPORT_SYMBOL(dquot_free_space); EXPORT_SYMBOL(dquot_free_inode); EXPORT_SYMBOL(dquot_transfer); EXPORT_SYMBOL(vfs_dq_transfer); EXPORT_SYMBOL(vfs_dq_quota_on_remount);