aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dquot.c
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2009-01-14 10:19:32 -0500
committerJan Kara <jack@suse.cz>2009-03-25 21:18:34 -0400
commit08d0350ce9d63b19b62498c7b6421c2a95246b95 (patch)
treedcea11d0210ec0c3da6b705970741b226724db2c /fs/dquot.c
parent9900ba3487f9ba392db30e12d210f768a90abb13 (diff)
quota: Move EXPORT_SYMBOL immediately next to the functions/varibles
According to checkpatch: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/dquot.c')
-rw-r--r--fs/dquot.c69
1 files changed, 33 insertions, 36 deletions
diff --git a/fs/dquot.c b/fs/dquot.c
index 2916f91ca40c..28aa14667602 100644
--- a/fs/dquot.c
+++ b/fs/dquot.c
@@ -132,6 +132,7 @@
132static DEFINE_SPINLOCK(dq_list_lock); 132static DEFINE_SPINLOCK(dq_list_lock);
133static DEFINE_SPINLOCK(dq_state_lock); 133static DEFINE_SPINLOCK(dq_state_lock);
134DEFINE_SPINLOCK(dq_data_lock); 134DEFINE_SPINLOCK(dq_data_lock);
135EXPORT_SYMBOL(dq_data_lock);
135 136
136static char *quotatypes[] = INITQFNAMES; 137static char *quotatypes[] = INITQFNAMES;
137static struct quota_format_type *quota_formats; /* List of registered formats */ 138static struct quota_format_type *quota_formats; /* List of registered formats */
@@ -148,6 +149,7 @@ int register_quota_format(struct quota_format_type *fmt)
148 spin_unlock(&dq_list_lock); 149 spin_unlock(&dq_list_lock);
149 return 0; 150 return 0;
150} 151}
152EXPORT_SYMBOL(register_quota_format);
151 153
152void unregister_quota_format(struct quota_format_type *fmt) 154void unregister_quota_format(struct quota_format_type *fmt)
153{ 155{
@@ -159,6 +161,7 @@ void unregister_quota_format(struct quota_format_type *fmt)
159 *actqf = (*actqf)->qf_next; 161 *actqf = (*actqf)->qf_next;
160 spin_unlock(&dq_list_lock); 162 spin_unlock(&dq_list_lock);
161} 163}
164EXPORT_SYMBOL(unregister_quota_format);
162 165
163static struct quota_format_type *find_quota_format(int id) 166static struct quota_format_type *find_quota_format(int id)
164{ 167{
@@ -215,6 +218,7 @@ static unsigned int dq_hash_bits, dq_hash_mask;
215static struct hlist_head *dquot_hash; 218static struct hlist_head *dquot_hash;
216 219
217struct dqstats dqstats; 220struct dqstats dqstats;
221EXPORT_SYMBOL(dqstats);
218 222
219static inline unsigned int 223static inline unsigned int
220hashfn(const struct super_block *sb, unsigned int id, int type) 224hashfn(const struct super_block *sb, unsigned int id, int type)
@@ -309,6 +313,7 @@ int dquot_mark_dquot_dirty(struct dquot *dquot)
309 spin_unlock(&dq_list_lock); 313 spin_unlock(&dq_list_lock);
310 return 0; 314 return 0;
311} 315}
316EXPORT_SYMBOL(dquot_mark_dquot_dirty);
312 317
313/* This function needs dq_list_lock */ 318/* This function needs dq_list_lock */
314static inline int clear_dquot_dirty(struct dquot *dquot) 319static inline int clear_dquot_dirty(struct dquot *dquot)
@@ -360,6 +365,7 @@ out_iolock:
360 mutex_unlock(&dquot->dq_lock); 365 mutex_unlock(&dquot->dq_lock);
361 return ret; 366 return ret;
362} 367}
368EXPORT_SYMBOL(dquot_acquire);
363 369
364/* 370/*
365 * Write dquot to disk 371 * Write dquot to disk
@@ -389,6 +395,7 @@ out_sem:
389 mutex_unlock(&dqopt->dqio_mutex); 395 mutex_unlock(&dqopt->dqio_mutex);
390 return ret; 396 return ret;
391} 397}
398EXPORT_SYMBOL(dquot_commit);
392 399
393/* 400/*
394 * Release dquot 401 * Release dquot
@@ -417,6 +424,7 @@ out_dqlock:
417 mutex_unlock(&dquot->dq_lock); 424 mutex_unlock(&dquot->dq_lock);
418 return ret; 425 return ret;
419} 426}
427EXPORT_SYMBOL(dquot_release);
420 428
421void dquot_destroy(struct dquot *dquot) 429void dquot_destroy(struct dquot *dquot)
422{ 430{
@@ -516,6 +524,7 @@ out:
516 mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex); 524 mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
517 return ret; 525 return ret;
518} 526}
527EXPORT_SYMBOL(dquot_scan_active);
519 528
520int vfs_quota_sync(struct super_block *sb, int type) 529int vfs_quota_sync(struct super_block *sb, int type)
521{ 530{
@@ -563,6 +572,7 @@ int vfs_quota_sync(struct super_block *sb, int type)
563 572
564 return 0; 573 return 0;
565} 574}
575EXPORT_SYMBOL(vfs_quota_sync);
566 576
567/* Free unused dquots from cache */ 577/* Free unused dquots from cache */
568static void prune_dqcache(int count) 578static void prune_dqcache(int count)
@@ -672,6 +682,7 @@ we_slept:
672 put_dquot_last(dquot); 682 put_dquot_last(dquot);
673 spin_unlock(&dq_list_lock); 683 spin_unlock(&dq_list_lock);
674} 684}
685EXPORT_SYMBOL(dqput);
675 686
676struct dquot *dquot_alloc(struct super_block *sb, int type) 687struct dquot *dquot_alloc(struct super_block *sb, int type)
677{ 688{
@@ -767,6 +778,7 @@ out:
767 778
768 return dquot; 779 return dquot;
769} 780}
781EXPORT_SYMBOL(dqget);
770 782
771static int dqinit_needed(struct inode *inode, int type) 783static int dqinit_needed(struct inode *inode, int type)
772{ 784{
@@ -1282,6 +1294,7 @@ out_err:
1282 dqput(got[cnt]); 1294 dqput(got[cnt]);
1283 return ret; 1295 return ret;
1284} 1296}
1297EXPORT_SYMBOL(dquot_initialize);
1285 1298
1286/* 1299/*
1287 * Release all quotas referenced by inode 1300 * Release all quotas referenced by inode
@@ -1302,6 +1315,7 @@ int dquot_drop(struct inode *inode)
1302 dqput(put[cnt]); 1315 dqput(put[cnt]);
1303 return 0; 1316 return 0;
1304} 1317}
1318EXPORT_SYMBOL(dquot_drop);
1305 1319
1306/* Wrapper to remove references to quota structures from inode */ 1320/* Wrapper to remove references to quota structures from inode */
1307void vfs_dq_drop(struct inode *inode) 1321void vfs_dq_drop(struct inode *inode)
@@ -1324,6 +1338,7 @@ void vfs_dq_drop(struct inode *inode)
1324 inode->i_sb->dq_op->drop(inode); 1338 inode->i_sb->dq_op->drop(inode);
1325 } 1339 }
1326} 1340}
1341EXPORT_SYMBOL(vfs_dq_drop);
1327 1342
1328/* 1343/*
1329 * Following four functions update i_blocks+i_bytes fields and 1344 * Following four functions update i_blocks+i_bytes fields and
@@ -1404,6 +1419,7 @@ out_unlock:
1404out: 1419out:
1405 return ret; 1420 return ret;
1406} 1421}
1422EXPORT_SYMBOL(dquot_alloc_space);
1407 1423
1408int dquot_reserve_space(struct inode *inode, qsize_t number, int warn) 1424int dquot_reserve_space(struct inode *inode, qsize_t number, int warn)
1409{ 1425{
@@ -1468,6 +1484,7 @@ warn_put_all:
1468 up_read(&sb_dqopt(inode->i_sb)->dqptr_sem); 1484 up_read(&sb_dqopt(inode->i_sb)->dqptr_sem);
1469 return ret; 1485 return ret;
1470} 1486}
1487EXPORT_SYMBOL(dquot_alloc_inode);
1471 1488
1472int dquot_claim_space(struct inode *inode, qsize_t number) 1489int dquot_claim_space(struct inode *inode, qsize_t number)
1473{ 1490{
@@ -1574,6 +1591,7 @@ out_sub:
1574 up_read(&sb_dqopt(inode->i_sb)->dqptr_sem); 1591 up_read(&sb_dqopt(inode->i_sb)->dqptr_sem);
1575 return QUOTA_OK; 1592 return QUOTA_OK;
1576} 1593}
1594EXPORT_SYMBOL(dquot_free_space);
1577 1595
1578/* 1596/*
1579 * This operation can block, but only after everything is updated 1597 * This operation can block, but only after everything is updated
@@ -1610,6 +1628,7 @@ int dquot_free_inode(const struct inode *inode, qsize_t number)
1610 up_read(&sb_dqopt(inode->i_sb)->dqptr_sem); 1628 up_read(&sb_dqopt(inode->i_sb)->dqptr_sem);
1611 return QUOTA_OK; 1629 return QUOTA_OK;
1612} 1630}
1631EXPORT_SYMBOL(dquot_free_inode);
1613 1632
1614/* 1633/*
1615 * call back function, get reserved quota space from underlying fs 1634 * call back function, get reserved quota space from underlying fs
@@ -1746,6 +1765,7 @@ over_quota:
1746 ret = NO_QUOTA; 1765 ret = NO_QUOTA;
1747 goto warn_put_all; 1766 goto warn_put_all;
1748} 1767}
1768EXPORT_SYMBOL(dquot_transfer);
1749 1769
1750/* Wrapper for transferring ownership of an inode */ 1770/* Wrapper for transferring ownership of an inode */
1751int vfs_dq_transfer(struct inode *inode, struct iattr *iattr) 1771int vfs_dq_transfer(struct inode *inode, struct iattr *iattr)
@@ -1757,7 +1777,7 @@ int vfs_dq_transfer(struct inode *inode, struct iattr *iattr)
1757 } 1777 }
1758 return 0; 1778 return 0;
1759} 1779}
1760 1780EXPORT_SYMBOL(vfs_dq_transfer);
1761 1781
1762/* 1782/*
1763 * Write info of quota file to disk 1783 * Write info of quota file to disk
@@ -1772,6 +1792,7 @@ int dquot_commit_info(struct super_block *sb, int type)
1772 mutex_unlock(&dqopt->dqio_mutex); 1792 mutex_unlock(&dqopt->dqio_mutex);
1773 return ret; 1793 return ret;
1774} 1794}
1795EXPORT_SYMBOL(dquot_commit_info);
1775 1796
1776/* 1797/*
1777 * Definitions of diskquota operations. 1798 * Definitions of diskquota operations.
@@ -1924,13 +1945,14 @@ put_inodes:
1924 } 1945 }
1925 return ret; 1946 return ret;
1926} 1947}
1948EXPORT_SYMBOL(vfs_quota_disable);
1927 1949
1928int vfs_quota_off(struct super_block *sb, int type, int remount) 1950int vfs_quota_off(struct super_block *sb, int type, int remount)
1929{ 1951{
1930 return vfs_quota_disable(sb, type, remount ? DQUOT_SUSPENDED : 1952 return vfs_quota_disable(sb, type, remount ? DQUOT_SUSPENDED :
1931 (DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED)); 1953 (DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED));
1932} 1954}
1933 1955EXPORT_SYMBOL(vfs_quota_off);
1934/* 1956/*
1935 * Turn quotas on on a device 1957 * Turn quotas on on a device
1936 */ 1958 */
@@ -2087,6 +2109,7 @@ int vfs_quota_on_path(struct super_block *sb, int type, int format_id,
2087 DQUOT_LIMITS_ENABLED); 2109 DQUOT_LIMITS_ENABLED);
2088 return error; 2110 return error;
2089} 2111}
2112EXPORT_SYMBOL(vfs_quota_on_path);
2090 2113
2091int vfs_quota_on(struct super_block *sb, int type, int format_id, char *name, 2114int vfs_quota_on(struct super_block *sb, int type, int format_id, char *name,
2092 int remount) 2115 int remount)
@@ -2104,6 +2127,7 @@ int vfs_quota_on(struct super_block *sb, int type, int format_id, char *name,
2104 } 2127 }
2105 return error; 2128 return error;
2106} 2129}
2130EXPORT_SYMBOL(vfs_quota_on);
2107 2131
2108/* 2132/*
2109 * More powerful function for turning on quotas allowing setting 2133 * More powerful function for turning on quotas allowing setting
@@ -2150,6 +2174,7 @@ out_lock:
2150load_quota: 2174load_quota:
2151 return vfs_load_quota_inode(inode, type, format_id, flags); 2175 return vfs_load_quota_inode(inode, type, format_id, flags);
2152} 2176}
2177EXPORT_SYMBOL(vfs_quota_enable);
2153 2178
2154/* 2179/*
2155 * This function is used when filesystem needs to initialize quotas 2180 * This function is used when filesystem needs to initialize quotas
@@ -2179,6 +2204,7 @@ out:
2179 dput(dentry); 2204 dput(dentry);
2180 return error; 2205 return error;
2181} 2206}
2207EXPORT_SYMBOL(vfs_quota_on_mount);
2182 2208
2183/* Wrapper to turn on quotas when remounting rw */ 2209/* Wrapper to turn on quotas when remounting rw */
2184int vfs_dq_quota_on_remount(struct super_block *sb) 2210int vfs_dq_quota_on_remount(struct super_block *sb)
@@ -2195,6 +2221,7 @@ int vfs_dq_quota_on_remount(struct super_block *sb)
2195 } 2221 }
2196 return ret; 2222 return ret;
2197} 2223}
2224EXPORT_SYMBOL(vfs_dq_quota_on_remount);
2198 2225
2199static inline qsize_t qbtos(qsize_t blocks) 2226static inline qsize_t qbtos(qsize_t blocks)
2200{ 2227{
@@ -2236,6 +2263,7 @@ int vfs_get_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *d
2236 2263
2237 return 0; 2264 return 0;
2238} 2265}
2266EXPORT_SYMBOL(vfs_get_dqblk);
2239 2267
2240/* Generic routine for setting common part of quota structure */ 2268/* Generic routine for setting common part of quota structure */
2241static int do_set_dqblk(struct dquot *dquot, struct if_dqblk *di) 2269static int do_set_dqblk(struct dquot *dquot, struct if_dqblk *di)
@@ -2327,6 +2355,7 @@ int vfs_set_dqblk(struct super_block *sb, int type, qid_t id, struct if_dqblk *d
2327out: 2355out:
2328 return rc; 2356 return rc;
2329} 2357}
2358EXPORT_SYMBOL(vfs_set_dqblk);
2330 2359
2331/* Generic routine for getting common part of quota file information */ 2360/* Generic routine for getting common part of quota file information */
2332int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) 2361int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii)
@@ -2348,6 +2377,7 @@ int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii)
2348 mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex); 2377 mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
2349 return 0; 2378 return 0;
2350} 2379}
2380EXPORT_SYMBOL(vfs_get_dqinfo);
2351 2381
2352/* Generic routine for setting common part of quota file information */ 2382/* Generic routine for setting common part of quota file information */
2353int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) 2383int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii)
@@ -2376,6 +2406,7 @@ out:
2376 mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex); 2406 mutex_unlock(&sb_dqopt(sb)->dqonoff_mutex);
2377 return err; 2407 return err;
2378} 2408}
2409EXPORT_SYMBOL(vfs_set_dqinfo);
2379 2410
2380struct quotactl_ops vfs_quotactl_ops = { 2411struct quotactl_ops vfs_quotactl_ops = {
2381 .quota_on = vfs_quota_on, 2412 .quota_on = vfs_quota_on,
@@ -2531,37 +2562,3 @@ static int __init dquot_init(void)
2531 return 0; 2562 return 0;
2532} 2563}
2533module_init(dquot_init); 2564module_init(dquot_init);
2534
2535EXPORT_SYMBOL(register_quota_format);
2536EXPORT_SYMBOL(unregister_quota_format);
2537EXPORT_SYMBOL(dqstats);
2538EXPORT_SYMBOL(dq_data_lock);
2539EXPORT_SYMBOL(vfs_quota_enable);
2540EXPORT_SYMBOL(vfs_quota_on);
2541EXPORT_SYMBOL(vfs_quota_on_path);
2542EXPORT_SYMBOL(vfs_quota_on_mount);
2543EXPORT_SYMBOL(vfs_quota_disable);
2544EXPORT_SYMBOL(vfs_quota_off);
2545EXPORT_SYMBOL(dquot_scan_active);
2546EXPORT_SYMBOL(vfs_quota_sync);
2547EXPORT_SYMBOL(vfs_get_dqinfo);
2548EXPORT_SYMBOL(vfs_set_dqinfo);
2549EXPORT_SYMBOL(vfs_get_dqblk);
2550EXPORT_SYMBOL(vfs_set_dqblk);
2551EXPORT_SYMBOL(dquot_commit);
2552EXPORT_SYMBOL(dquot_commit_info);
2553EXPORT_SYMBOL(dquot_acquire);
2554EXPORT_SYMBOL(dquot_release);
2555EXPORT_SYMBOL(dquot_mark_dquot_dirty);
2556EXPORT_SYMBOL(dquot_initialize);
2557EXPORT_SYMBOL(dquot_drop);
2558EXPORT_SYMBOL(vfs_dq_drop);
2559EXPORT_SYMBOL(dqget);
2560EXPORT_SYMBOL(dqput);
2561EXPORT_SYMBOL(dquot_alloc_space);
2562EXPORT_SYMBOL(dquot_alloc_inode);
2563EXPORT_SYMBOL(dquot_free_space);
2564EXPORT_SYMBOL(dquot_free_inode);
2565EXPORT_SYMBOL(dquot_transfer);
2566EXPORT_SYMBOL(vfs_dq_transfer);
2567EXPORT_SYMBOL(vfs_dq_quota_on_remount);