diff options
author | Mingming Cao <cmm@us.ibm.com> | 2009-01-14 10:19:32 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-03-25 21:18:34 -0400 |
commit | 08d0350ce9d63b19b62498c7b6421c2a95246b95 (patch) | |
tree | dcea11d0210ec0c3da6b705970741b226724db2c /fs/dquot.c | |
parent | 9900ba3487f9ba392db30e12d210f768a90abb13 (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.c | 69 |
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 @@ | |||
132 | static DEFINE_SPINLOCK(dq_list_lock); | 132 | static DEFINE_SPINLOCK(dq_list_lock); |
133 | static DEFINE_SPINLOCK(dq_state_lock); | 133 | static DEFINE_SPINLOCK(dq_state_lock); |
134 | DEFINE_SPINLOCK(dq_data_lock); | 134 | DEFINE_SPINLOCK(dq_data_lock); |
135 | EXPORT_SYMBOL(dq_data_lock); | ||
135 | 136 | ||
136 | static char *quotatypes[] = INITQFNAMES; | 137 | static char *quotatypes[] = INITQFNAMES; |
137 | static struct quota_format_type *quota_formats; /* List of registered formats */ | 138 | static 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 | } |
152 | EXPORT_SYMBOL(register_quota_format); | ||
151 | 153 | ||
152 | void unregister_quota_format(struct quota_format_type *fmt) | 154 | void 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 | } |
164 | EXPORT_SYMBOL(unregister_quota_format); | ||
162 | 165 | ||
163 | static struct quota_format_type *find_quota_format(int id) | 166 | static struct quota_format_type *find_quota_format(int id) |
164 | { | 167 | { |
@@ -215,6 +218,7 @@ static unsigned int dq_hash_bits, dq_hash_mask; | |||
215 | static struct hlist_head *dquot_hash; | 218 | static struct hlist_head *dquot_hash; |
216 | 219 | ||
217 | struct dqstats dqstats; | 220 | struct dqstats dqstats; |
221 | EXPORT_SYMBOL(dqstats); | ||
218 | 222 | ||
219 | static inline unsigned int | 223 | static inline unsigned int |
220 | hashfn(const struct super_block *sb, unsigned int id, int type) | 224 | hashfn(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 | } |
316 | EXPORT_SYMBOL(dquot_mark_dquot_dirty); | ||
312 | 317 | ||
313 | /* This function needs dq_list_lock */ | 318 | /* This function needs dq_list_lock */ |
314 | static inline int clear_dquot_dirty(struct dquot *dquot) | 319 | static 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 | } |
368 | EXPORT_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 | } |
398 | EXPORT_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 | } |
427 | EXPORT_SYMBOL(dquot_release); | ||
420 | 428 | ||
421 | void dquot_destroy(struct dquot *dquot) | 429 | void 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 | } |
527 | EXPORT_SYMBOL(dquot_scan_active); | ||
519 | 528 | ||
520 | int vfs_quota_sync(struct super_block *sb, int type) | 529 | int 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 | } |
575 | EXPORT_SYMBOL(vfs_quota_sync); | ||
566 | 576 | ||
567 | /* Free unused dquots from cache */ | 577 | /* Free unused dquots from cache */ |
568 | static void prune_dqcache(int count) | 578 | static 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 | } |
685 | EXPORT_SYMBOL(dqput); | ||
675 | 686 | ||
676 | struct dquot *dquot_alloc(struct super_block *sb, int type) | 687 | struct 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 | } |
781 | EXPORT_SYMBOL(dqget); | ||
770 | 782 | ||
771 | static int dqinit_needed(struct inode *inode, int type) | 783 | static 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 | } |
1297 | EXPORT_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 | } |
1318 | EXPORT_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 */ |
1307 | void vfs_dq_drop(struct inode *inode) | 1321 | void 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 | } |
1341 | EXPORT_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: | |||
1404 | out: | 1419 | out: |
1405 | return ret; | 1420 | return ret; |
1406 | } | 1421 | } |
1422 | EXPORT_SYMBOL(dquot_alloc_space); | ||
1407 | 1423 | ||
1408 | int dquot_reserve_space(struct inode *inode, qsize_t number, int warn) | 1424 | int 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 | } |
1487 | EXPORT_SYMBOL(dquot_alloc_inode); | ||
1471 | 1488 | ||
1472 | int dquot_claim_space(struct inode *inode, qsize_t number) | 1489 | int 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 | } |
1594 | EXPORT_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 | } |
1631 | EXPORT_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 | } |
1768 | EXPORT_SYMBOL(dquot_transfer); | ||
1749 | 1769 | ||
1750 | /* Wrapper for transferring ownership of an inode */ | 1770 | /* Wrapper for transferring ownership of an inode */ |
1751 | int vfs_dq_transfer(struct inode *inode, struct iattr *iattr) | 1771 | int 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 | 1780 | EXPORT_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 | } |
1795 | EXPORT_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 | } |
1948 | EXPORT_SYMBOL(vfs_quota_disable); | ||
1927 | 1949 | ||
1928 | int vfs_quota_off(struct super_block *sb, int type, int remount) | 1950 | int 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 | 1955 | EXPORT_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 | } |
2112 | EXPORT_SYMBOL(vfs_quota_on_path); | ||
2090 | 2113 | ||
2091 | int vfs_quota_on(struct super_block *sb, int type, int format_id, char *name, | 2114 | int 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 | } |
2130 | EXPORT_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: | |||
2150 | load_quota: | 2174 | load_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 | } |
2177 | EXPORT_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 | } |
2207 | EXPORT_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 */ |
2184 | int vfs_dq_quota_on_remount(struct super_block *sb) | 2210 | int 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 | } |
2224 | EXPORT_SYMBOL(vfs_dq_quota_on_remount); | ||
2198 | 2225 | ||
2199 | static inline qsize_t qbtos(qsize_t blocks) | 2226 | static 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 | } |
2266 | EXPORT_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 */ |
2241 | static int do_set_dqblk(struct dquot *dquot, struct if_dqblk *di) | 2269 | static 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 | |||
2327 | out: | 2355 | out: |
2328 | return rc; | 2356 | return rc; |
2329 | } | 2357 | } |
2358 | EXPORT_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 */ |
2332 | int vfs_get_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) | 2361 | int 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 | } |
2380 | EXPORT_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 */ |
2353 | int vfs_set_dqinfo(struct super_block *sb, int type, struct if_dqinfo *ii) | 2383 | int 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 | } |
2409 | EXPORT_SYMBOL(vfs_set_dqinfo); | ||
2379 | 2410 | ||
2380 | struct quotactl_ops vfs_quotactl_ops = { | 2411 | struct 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 | } |
2533 | module_init(dquot_init); | 2564 | module_init(dquot_init); |
2534 | |||
2535 | EXPORT_SYMBOL(register_quota_format); | ||
2536 | EXPORT_SYMBOL(unregister_quota_format); | ||
2537 | EXPORT_SYMBOL(dqstats); | ||
2538 | EXPORT_SYMBOL(dq_data_lock); | ||
2539 | EXPORT_SYMBOL(vfs_quota_enable); | ||
2540 | EXPORT_SYMBOL(vfs_quota_on); | ||
2541 | EXPORT_SYMBOL(vfs_quota_on_path); | ||
2542 | EXPORT_SYMBOL(vfs_quota_on_mount); | ||
2543 | EXPORT_SYMBOL(vfs_quota_disable); | ||
2544 | EXPORT_SYMBOL(vfs_quota_off); | ||
2545 | EXPORT_SYMBOL(dquot_scan_active); | ||
2546 | EXPORT_SYMBOL(vfs_quota_sync); | ||
2547 | EXPORT_SYMBOL(vfs_get_dqinfo); | ||
2548 | EXPORT_SYMBOL(vfs_set_dqinfo); | ||
2549 | EXPORT_SYMBOL(vfs_get_dqblk); | ||
2550 | EXPORT_SYMBOL(vfs_set_dqblk); | ||
2551 | EXPORT_SYMBOL(dquot_commit); | ||
2552 | EXPORT_SYMBOL(dquot_commit_info); | ||
2553 | EXPORT_SYMBOL(dquot_acquire); | ||
2554 | EXPORT_SYMBOL(dquot_release); | ||
2555 | EXPORT_SYMBOL(dquot_mark_dquot_dirty); | ||
2556 | EXPORT_SYMBOL(dquot_initialize); | ||
2557 | EXPORT_SYMBOL(dquot_drop); | ||
2558 | EXPORT_SYMBOL(vfs_dq_drop); | ||
2559 | EXPORT_SYMBOL(dqget); | ||
2560 | EXPORT_SYMBOL(dqput); | ||
2561 | EXPORT_SYMBOL(dquot_alloc_space); | ||
2562 | EXPORT_SYMBOL(dquot_alloc_inode); | ||
2563 | EXPORT_SYMBOL(dquot_free_space); | ||
2564 | EXPORT_SYMBOL(dquot_free_inode); | ||
2565 | EXPORT_SYMBOL(dquot_transfer); | ||
2566 | EXPORT_SYMBOL(vfs_dq_transfer); | ||
2567 | EXPORT_SYMBOL(vfs_dq_quota_on_remount); | ||