aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2007-11-23 00:28:09 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-02-07 02:14:38 -0500
commita8272ce0c1d49aa3bec57682678f0bdfe28ed4ca (patch)
tree691b5ac5b1e36bf0dd59408434e3856438258a0e /fs
parenta69b176df246d59626e6a9c640b44c0921fa4566 (diff)
[XFS] Fix up sparse warnings.
These are mostly locking annotations, marking things static, casts where needed and declaring stuff in header files. SGI-PV: 971186 SGI-Modid: xfs-linux-melb:xfs-kern:30002a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/linux-2.6/xfs_globals.c3
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl.c2
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl32.c1
-rw-r--r--fs/xfs/xfs_attr.c2
-rw-r--r--fs/xfs/xfs_bmap.c6
-rw-r--r--fs/xfs/xfs_bmap.h2
-rw-r--r--fs/xfs/xfs_btree.h2
-rw-r--r--fs/xfs/xfs_buf_item.h2
-rw-r--r--fs/xfs/xfs_da_btree.h1
-rw-r--r--fs/xfs/xfs_dir2.c1
-rw-r--r--fs/xfs/xfs_filestream.c2
-rw-r--r--fs/xfs/xfs_log.c24
-rw-r--r--fs/xfs/xfs_log_recover.c4
-rw-r--r--fs/xfs/xfs_mount.c2
-rw-r--r--fs/xfs/xfs_mru_cache.c18
-rw-r--r--fs/xfs/xfs_rename.c1
-rw-r--r--fs/xfs/xfs_trans.h2
-rw-r--r--fs/xfs/xfs_trans_item.c1
-rw-r--r--fs/xfs/xfs_vfsops.c11
19 files changed, 50 insertions, 37 deletions
diff --git a/fs/xfs/linux-2.6/xfs_globals.c b/fs/xfs/linux-2.6/xfs_globals.c
index 9febf9dc999d..ef90e64641e6 100644
--- a/fs/xfs/linux-2.6/xfs_globals.c
+++ b/fs/xfs/linux-2.6/xfs_globals.c
@@ -47,5 +47,6 @@ xfs_param_t xfs_params = {
47/* 47/*
48 * Global system credential structure. 48 * Global system credential structure.
49 */ 49 */
50cred_t sys_cred_val, *sys_cred = &sys_cred_val; 50static cred_t sys_cred_val;
51cred_t *sys_cred = &sys_cred_val;
51 52
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index cb2c99126288..daa351a0a03d 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -512,7 +512,7 @@ xfs_attrmulti_attr_get(
512 if (!kbuf) 512 if (!kbuf)
513 return ENOMEM; 513 return ENOMEM;
514 514
515 error = xfs_attr_get(XFS_I(inode), name, kbuf, len, flags, NULL); 515 error = xfs_attr_get(XFS_I(inode), name, kbuf, (int *)len, flags, NULL);
516 if (error) 516 if (error)
517 goto out_kfree; 517 goto out_kfree;
518 518
diff --git a/fs/xfs/linux-2.6/xfs_ioctl32.c b/fs/xfs/linux-2.6/xfs_ioctl32.c
index 83463c27545c..a4b254eb43b2 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl32.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl32.c
@@ -44,6 +44,7 @@
44#include "xfs_error.h" 44#include "xfs_error.h"
45#include "xfs_dfrag.h" 45#include "xfs_dfrag.h"
46#include "xfs_vnodeops.h" 46#include "xfs_vnodeops.h"
47#include "xfs_ioctl32.h"
47 48
48#define _NATIVE_IOC(cmd, type) \ 49#define _NATIVE_IOC(cmd, type) \
49 _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(type)) 50 _IOC(_IOC_DIR(cmd), _IOC_TYPE(cmd), _IOC_NR(cmd), sizeof(type))
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c
index 93fa64dd1be6..e58f321fdae9 100644
--- a/fs/xfs/xfs_attr.c
+++ b/fs/xfs/xfs_attr.c
@@ -929,7 +929,7 @@ xfs_attr_shortform_addname(xfs_da_args_t *args)
929 * This leaf block cannot have a "remote" value, we only call this routine 929 * This leaf block cannot have a "remote" value, we only call this routine
930 * if bmap_one_block() says there is only one block (ie: no remote blks). 930 * if bmap_one_block() says there is only one block (ie: no remote blks).
931 */ 931 */
932int 932STATIC int
933xfs_attr_leaf_addname(xfs_da_args_t *args) 933xfs_attr_leaf_addname(xfs_da_args_t *args)
934{ 934{
935 xfs_inode_t *dp; 935 xfs_inode_t *dp;
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index 97f0328b5ac2..b02452b11456 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/fs/xfs/xfs_bmap.c
@@ -6393,7 +6393,7 @@ xfs_bmap_count_blocks(
6393 * Recursively walks each level of a btree 6393 * Recursively walks each level of a btree
6394 * to count total fsblocks is use. 6394 * to count total fsblocks is use.
6395 */ 6395 */
6396int /* error */ 6396STATIC int /* error */
6397xfs_bmap_count_tree( 6397xfs_bmap_count_tree(
6398 xfs_mount_t *mp, /* file system mount point */ 6398 xfs_mount_t *mp, /* file system mount point */
6399 xfs_trans_t *tp, /* transaction pointer */ 6399 xfs_trans_t *tp, /* transaction pointer */
@@ -6469,7 +6469,7 @@ xfs_bmap_count_tree(
6469/* 6469/*
6470 * Count leaf blocks given a range of extent records. 6470 * Count leaf blocks given a range of extent records.
6471 */ 6471 */
6472int 6472STATIC int
6473xfs_bmap_count_leaves( 6473xfs_bmap_count_leaves(
6474 xfs_ifork_t *ifp, 6474 xfs_ifork_t *ifp,
6475 xfs_extnum_t idx, 6475 xfs_extnum_t idx,
@@ -6489,7 +6489,7 @@ xfs_bmap_count_leaves(
6489 * Count leaf blocks given a range of extent records originally 6489 * Count leaf blocks given a range of extent records originally
6490 * in btree format. 6490 * in btree format.
6491 */ 6491 */
6492int 6492STATIC int
6493xfs_bmap_disk_count_leaves( 6493xfs_bmap_disk_count_leaves(
6494 xfs_extnum_t idx, 6494 xfs_extnum_t idx,
6495 xfs_bmbt_block_t *block, 6495 xfs_bmbt_block_t *block,
diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h
index 68267d75ff19..87224b7d7984 100644
--- a/fs/xfs/xfs_bmap.h
+++ b/fs/xfs/xfs_bmap.h
@@ -25,6 +25,8 @@ struct xfs_inode;
25struct xfs_mount; 25struct xfs_mount;
26struct xfs_trans; 26struct xfs_trans;
27 27
28extern kmem_zone_t *xfs_bmap_free_item_zone;
29
28/* 30/*
29 * DELTA: describe a change to the in-core extent list. 31 * DELTA: describe a change to the in-core extent list.
30 * 32 *
diff --git a/fs/xfs/xfs_btree.h b/fs/xfs/xfs_btree.h
index 6e40a0a198ff..7440b78f9cec 100644
--- a/fs/xfs/xfs_btree.h
+++ b/fs/xfs/xfs_btree.h
@@ -24,6 +24,8 @@ struct xfs_inode;
24struct xfs_mount; 24struct xfs_mount;
25struct xfs_trans; 25struct xfs_trans;
26 26
27extern kmem_zone_t *xfs_btree_cur_zone;
28
27/* 29/*
28 * This nonsense is to make -wlint happy. 30 * This nonsense is to make -wlint happy.
29 */ 31 */
diff --git a/fs/xfs/xfs_buf_item.h b/fs/xfs/xfs_buf_item.h
index d7e136143066..5a41c348bb1c 100644
--- a/fs/xfs/xfs_buf_item.h
+++ b/fs/xfs/xfs_buf_item.h
@@ -18,6 +18,8 @@
18#ifndef __XFS_BUF_ITEM_H__ 18#ifndef __XFS_BUF_ITEM_H__
19#define __XFS_BUF_ITEM_H__ 19#define __XFS_BUF_ITEM_H__
20 20
21extern kmem_zone_t *xfs_buf_item_zone;
22
21/* 23/*
22 * This is the structure used to lay out a buf log item in the 24 * This is the structure used to lay out a buf log item in the
23 * log. The data map describes which 128 byte chunks of the buffer 25 * log. The data map describes which 128 byte chunks of the buffer
diff --git a/fs/xfs/xfs_da_btree.h b/fs/xfs/xfs_da_btree.h
index 44dabf02f2a3..7facf86f74f9 100644
--- a/fs/xfs/xfs_da_btree.h
+++ b/fs/xfs/xfs_da_btree.h
@@ -260,6 +260,7 @@ void xfs_da_binval(struct xfs_trans *tp, xfs_dabuf_t *dabuf);
260xfs_daddr_t xfs_da_blkno(xfs_dabuf_t *dabuf); 260xfs_daddr_t xfs_da_blkno(xfs_dabuf_t *dabuf);
261 261
262extern struct kmem_zone *xfs_da_state_zone; 262extern struct kmem_zone *xfs_da_state_zone;
263extern struct kmem_zone *xfs_dabuf_zone;
263#endif /* __KERNEL__ */ 264#endif /* __KERNEL__ */
264 265
265#endif /* __XFS_DA_BTREE_H__ */ 266#endif /* __XFS_DA_BTREE_H__ */
diff --git a/fs/xfs/xfs_dir2.c b/fs/xfs/xfs_dir2.c
index 1e22133178d3..be7c4251fa61 100644
--- a/fs/xfs/xfs_dir2.c
+++ b/fs/xfs/xfs_dir2.c
@@ -42,6 +42,7 @@
42#include "xfs_dir2_node.h" 42#include "xfs_dir2_node.h"
43#include "xfs_dir2_trace.h" 43#include "xfs_dir2_trace.h"
44#include "xfs_error.h" 44#include "xfs_error.h"
45#include "xfs_vnodeops.h"
45 46
46 47
47void 48void
diff --git a/fs/xfs/xfs_filestream.c b/fs/xfs/xfs_filestream.c
index 36d8f6aa11af..eb03eab5ca52 100644
--- a/fs/xfs/xfs_filestream.c
+++ b/fs/xfs/xfs_filestream.c
@@ -348,7 +348,7 @@ _xfs_filestream_update_ag(
348} 348}
349 349
350/* xfs_fstrm_free_func(): callback for freeing cached stream items. */ 350/* xfs_fstrm_free_func(): callback for freeing cached stream items. */
351void 351STATIC void
352xfs_fstrm_free_func( 352xfs_fstrm_free_func(
353 unsigned long ino, 353 unsigned long ino,
354 void *data) 354 void *data)
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index 6e3d8084d8b3..301a6b8c2034 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -907,7 +907,7 @@ xlog_assign_tail_lsn(xfs_mount_t *mp)
907 * the tail. The details of this case are described below, but the end 907 * the tail. The details of this case are described below, but the end
908 * result is that we return the size of the log as the amount of space left. 908 * result is that we return the size of the log as the amount of space left.
909 */ 909 */
910int 910STATIC int
911xlog_space_left(xlog_t *log, int cycle, int bytes) 911xlog_space_left(xlog_t *log, int cycle, int bytes)
912{ 912{
913 int free_bytes; 913 int free_bytes;
@@ -1289,7 +1289,7 @@ xlog_commit_record(xfs_mount_t *mp,
1289 * pushes on an lsn which is further along in the log once we reach the high 1289 * pushes on an lsn which is further along in the log once we reach the high
1290 * water mark. In this manner, we would be creating a low water mark. 1290 * water mark. In this manner, we would be creating a low water mark.
1291 */ 1291 */
1292void 1292STATIC void
1293xlog_grant_push_ail(xfs_mount_t *mp, 1293xlog_grant_push_ail(xfs_mount_t *mp,
1294 int need_bytes) 1294 int need_bytes)
1295{ 1295{
@@ -1372,7 +1372,7 @@ xlog_grant_push_ail(xfs_mount_t *mp,
1372 * is added immediately before calling bwrite(). 1372 * is added immediately before calling bwrite().
1373 */ 1373 */
1374 1374
1375int 1375STATIC int
1376xlog_sync(xlog_t *log, 1376xlog_sync(xlog_t *log,
1377 xlog_in_core_t *iclog) 1377 xlog_in_core_t *iclog)
1378{ 1378{
@@ -1516,7 +1516,7 @@ xlog_sync(xlog_t *log,
1516/* 1516/*
1517 * Deallocate a log structure 1517 * Deallocate a log structure
1518 */ 1518 */
1519void 1519STATIC void
1520xlog_dealloc_log(xlog_t *log) 1520xlog_dealloc_log(xlog_t *log)
1521{ 1521{
1522 xlog_in_core_t *iclog, *next_iclog; 1522 xlog_in_core_t *iclog, *next_iclog;
@@ -1738,7 +1738,7 @@ xlog_print_tic_res(xfs_mount_t *mp, xlog_ticket_t *ticket)
1738 * we don't update ic_offset until the end when we know exactly how many 1738 * we don't update ic_offset until the end when we know exactly how many
1739 * bytes have been written out. 1739 * bytes have been written out.
1740 */ 1740 */
1741int 1741STATIC int
1742xlog_write(xfs_mount_t * mp, 1742xlog_write(xfs_mount_t * mp,
1743 xfs_log_iovec_t reg[], 1743 xfs_log_iovec_t reg[],
1744 int nentries, 1744 int nentries,
@@ -2280,7 +2280,7 @@ xlog_state_do_callback(
2280 * global state machine log lock. Assume that the calls to cvsema won't 2280 * global state machine log lock. Assume that the calls to cvsema won't
2281 * take a long time. At least we know it won't sleep. 2281 * take a long time. At least we know it won't sleep.
2282 */ 2282 */
2283void 2283STATIC void
2284xlog_state_done_syncing( 2284xlog_state_done_syncing(
2285 xlog_in_core_t *iclog, 2285 xlog_in_core_t *iclog,
2286 int aborted) 2286 int aborted)
@@ -2340,7 +2340,7 @@ xlog_state_done_syncing(
2340 * needs to be incremented, depending on the amount of data which 2340 * needs to be incremented, depending on the amount of data which
2341 * is copied. 2341 * is copied.
2342 */ 2342 */
2343int 2343STATIC int
2344xlog_state_get_iclog_space(xlog_t *log, 2344xlog_state_get_iclog_space(xlog_t *log,
2345 int len, 2345 int len,
2346 xlog_in_core_t **iclogp, 2346 xlog_in_core_t **iclogp,
@@ -2776,7 +2776,7 @@ xlog_ungrant_log_space(xlog_t *log,
2776/* 2776/*
2777 * Atomically put back used ticket. 2777 * Atomically put back used ticket.
2778 */ 2778 */
2779void 2779STATIC void
2780xlog_state_put_ticket(xlog_t *log, 2780xlog_state_put_ticket(xlog_t *log,
2781 xlog_ticket_t *tic) 2781 xlog_ticket_t *tic)
2782{ 2782{
@@ -2794,7 +2794,7 @@ xlog_state_put_ticket(xlog_t *log,
2794 * 2794 *
2795 * 2795 *
2796 */ 2796 */
2797int 2797STATIC int
2798xlog_state_release_iclog(xlog_t *log, 2798xlog_state_release_iclog(xlog_t *log,
2799 xlog_in_core_t *iclog) 2799 xlog_in_core_t *iclog)
2800{ 2800{
@@ -3024,7 +3024,7 @@ no_sleep:
3024 * If filesystem activity goes to zero, the iclog will get flushed only by 3024 * If filesystem activity goes to zero, the iclog will get flushed only by
3025 * bdflush(). 3025 * bdflush().
3026 */ 3026 */
3027int 3027STATIC int
3028xlog_state_sync(xlog_t *log, 3028xlog_state_sync(xlog_t *log,
3029 xfs_lsn_t lsn, 3029 xfs_lsn_t lsn,
3030 uint flags, 3030 uint flags,
@@ -3129,7 +3129,7 @@ try_again:
3129 * Called when we want to mark the current iclog as being ready to sync to 3129 * Called when we want to mark the current iclog as being ready to sync to
3130 * disk. 3130 * disk.
3131 */ 3131 */
3132void 3132STATIC void
3133xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog) 3133xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog)
3134{ 3134{
3135 spin_lock(&log->l_icloglock); 3135 spin_lock(&log->l_icloglock);
@@ -3241,7 +3241,7 @@ xlog_ticket_put(xlog_t *log,
3241/* 3241/*
3242 * Grab ticket off freelist or allocation some more 3242 * Grab ticket off freelist or allocation some more
3243 */ 3243 */
3244xlog_ticket_t * 3244STATIC xlog_ticket_t *
3245xlog_ticket_get(xlog_t *log, 3245xlog_ticket_get(xlog_t *log,
3246 int unit_bytes, 3246 int unit_bytes,
3247 int cnt, 3247 int cnt,
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 35e098d4d749..3b804b93b282 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -293,7 +293,7 @@ xlog_recover_iodone(
293 * Note that the algorithm can not be perfect because the disk will not 293 * Note that the algorithm can not be perfect because the disk will not
294 * necessarily be perfect. 294 * necessarily be perfect.
295 */ 295 */
296int 296STATIC int
297xlog_find_cycle_start( 297xlog_find_cycle_start(
298 xlog_t *log, 298 xlog_t *log,
299 xfs_buf_t *bp, 299 xfs_buf_t *bp,
@@ -986,7 +986,7 @@ exit:
986 * -1 => use *blk_no as the first block of the log 986 * -1 => use *blk_no as the first block of the log
987 * >0 => error has occurred 987 * >0 => error has occurred
988 */ 988 */
989int 989STATIC int
990xlog_find_zeroed( 990xlog_find_zeroed(
991 xlog_t *log, 991 xlog_t *log,
992 xfs_daddr_t *blk_no) 992 xfs_daddr_t *blk_no)
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 2806d43d7d23..766c01670b2c 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -2343,7 +2343,7 @@ out:
2343 spin_unlock(&mp->m_sb_lock); 2343 spin_unlock(&mp->m_sb_lock);
2344} 2344}
2345 2345
2346int 2346STATIC int
2347xfs_icsb_modify_counters( 2347xfs_icsb_modify_counters(
2348 xfs_mount_t *mp, 2348 xfs_mount_t *mp,
2349 xfs_sb_field_t field, 2349 xfs_sb_field_t field,
diff --git a/fs/xfs/xfs_mru_cache.c b/fs/xfs/xfs_mru_cache.c
index 012209eda35d..a0b2c0a2589a 100644
--- a/fs/xfs/xfs_mru_cache.c
+++ b/fs/xfs/xfs_mru_cache.c
@@ -225,10 +225,14 @@ _xfs_mru_cache_list_insert(
225 * list need to be deleted. For each element this involves removing it from the 225 * list need to be deleted. For each element this involves removing it from the
226 * data store, removing it from the reap list, calling the client's free 226 * data store, removing it from the reap list, calling the client's free
227 * function and deleting the element from the element zone. 227 * function and deleting the element from the element zone.
228 *
229 * We get called holding the mru->lock, which we drop and then reacquire.
230 * Sparse need special help with this to tell it we know what we are doing.
228 */ 231 */
229STATIC void 232STATIC void
230_xfs_mru_cache_clear_reap_list( 233_xfs_mru_cache_clear_reap_list(
231 xfs_mru_cache_t *mru) 234 xfs_mru_cache_t *mru) __releases(mru->lock) __acquires(mru->lock)
235
232{ 236{
233 xfs_mru_cache_elem_t *elem, *next; 237 xfs_mru_cache_elem_t *elem, *next;
234 struct list_head tmp; 238 struct list_head tmp;
@@ -528,6 +532,10 @@ xfs_mru_cache_delete(
528 * 532 *
529 * If the element isn't found, this function returns NULL and the spinlock is 533 * If the element isn't found, this function returns NULL and the spinlock is
530 * released. xfs_mru_cache_done() should NOT be called when this occurs. 534 * released. xfs_mru_cache_done() should NOT be called when this occurs.
535 *
536 * Because sparse isn't smart enough to know about conditional lock return
537 * status, we need to help it get it right by annotating the path that does
538 * not release the lock.
531 */ 539 */
532void * 540void *
533xfs_mru_cache_lookup( 541xfs_mru_cache_lookup(
@@ -545,8 +553,8 @@ xfs_mru_cache_lookup(
545 if (elem) { 553 if (elem) {
546 list_del(&elem->list_node); 554 list_del(&elem->list_node);
547 _xfs_mru_cache_list_insert(mru, elem); 555 _xfs_mru_cache_list_insert(mru, elem);
548 } 556 __release(mru_lock); /* help sparse not be stupid */
549 else 557 } else
550 spin_unlock(&mru->lock); 558 spin_unlock(&mru->lock);
551 559
552 return elem ? elem->value : NULL; 560 return elem ? elem->value : NULL;
@@ -575,6 +583,8 @@ xfs_mru_cache_peek(
575 elem = radix_tree_lookup(&mru->store, key); 583 elem = radix_tree_lookup(&mru->store, key);
576 if (!elem) 584 if (!elem)
577 spin_unlock(&mru->lock); 585 spin_unlock(&mru->lock);
586 else
587 __release(mru_lock); /* help sparse not be stupid */
578 588
579 return elem ? elem->value : NULL; 589 return elem ? elem->value : NULL;
580} 590}
@@ -586,7 +596,7 @@ xfs_mru_cache_peek(
586 */ 596 */
587void 597void
588xfs_mru_cache_done( 598xfs_mru_cache_done(
589 xfs_mru_cache_t *mru) 599 xfs_mru_cache_t *mru) __releases(mru->lock)
590{ 600{
591 spin_unlock(&mru->lock); 601 spin_unlock(&mru->lock);
592} 602}
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c
index 17e7496bdd5f..7eb157a59f9e 100644
--- a/fs/xfs/xfs_rename.c
+++ b/fs/xfs/xfs_rename.c
@@ -39,6 +39,7 @@
39#include "xfs_refcache.h" 39#include "xfs_refcache.h"
40#include "xfs_utils.h" 40#include "xfs_utils.h"
41#include "xfs_trans_space.h" 41#include "xfs_trans_space.h"
42#include "xfs_vnodeops.h"
42 43
43 44
44/* 45/*
diff --git a/fs/xfs/xfs_trans.h b/fs/xfs/xfs_trans.h
index 0e26e729023e..bea6e2b95a90 100644
--- a/fs/xfs/xfs_trans.h
+++ b/fs/xfs/xfs_trans.h
@@ -1001,6 +1001,8 @@ xfs_log_busy_slot_t *xfs_trans_add_busy(xfs_trans_t *tp,
1001 xfs_agnumber_t ag, 1001 xfs_agnumber_t ag,
1002 xfs_extlen_t idx); 1002 xfs_extlen_t idx);
1003 1003
1004extern kmem_zone_t *xfs_trans_zone;
1005
1004#endif /* __KERNEL__ */ 1006#endif /* __KERNEL__ */
1005 1007
1006#endif /* __XFS_TRANS_H__ */ 1008#endif /* __XFS_TRANS_H__ */
diff --git a/fs/xfs/xfs_trans_item.c b/fs/xfs/xfs_trans_item.c
index 2912aac07c7b..66a09f0d894b 100644
--- a/fs/xfs/xfs_trans_item.c
+++ b/fs/xfs/xfs_trans_item.c
@@ -21,6 +21,7 @@
21#include "xfs_log.h" 21#include "xfs_log.h"
22#include "xfs_inum.h" 22#include "xfs_inum.h"
23#include "xfs_trans.h" 23#include "xfs_trans.h"
24#include "xfs_trans_priv.h"
24 25
25STATIC int xfs_trans_unlock_chunk(xfs_log_item_chunk_t *, 26STATIC int xfs_trans_unlock_chunk(xfs_log_item_chunk_t *,
26 int, int, xfs_lsn_t); 27 int, int, xfs_lsn_t);
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index fd4a0dfc599f..871a1747706b 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -61,11 +61,6 @@
61int 61int
62xfs_init(void) 62xfs_init(void)
63{ 63{
64 extern kmem_zone_t *xfs_bmap_free_item_zone;
65 extern kmem_zone_t *xfs_btree_cur_zone;
66 extern kmem_zone_t *xfs_trans_zone;
67 extern kmem_zone_t *xfs_buf_item_zone;
68 extern kmem_zone_t *xfs_dabuf_zone;
69#ifdef XFS_DABUF_DEBUG 64#ifdef XFS_DABUF_DEBUG
70 extern spinlock_t xfs_dabuf_global_lock; 65 extern spinlock_t xfs_dabuf_global_lock;
71 spin_lock_init(&xfs_dabuf_global_lock); 66 spin_lock_init(&xfs_dabuf_global_lock);
@@ -155,15 +150,9 @@ xfs_init(void)
155void 150void
156xfs_cleanup(void) 151xfs_cleanup(void)
157{ 152{
158 extern kmem_zone_t *xfs_bmap_free_item_zone;
159 extern kmem_zone_t *xfs_btree_cur_zone;
160 extern kmem_zone_t *xfs_inode_zone; 153 extern kmem_zone_t *xfs_inode_zone;
161 extern kmem_zone_t *xfs_trans_zone;
162 extern kmem_zone_t *xfs_da_state_zone;
163 extern kmem_zone_t *xfs_dabuf_zone;
164 extern kmem_zone_t *xfs_efd_zone; 154 extern kmem_zone_t *xfs_efd_zone;
165 extern kmem_zone_t *xfs_efi_zone; 155 extern kmem_zone_t *xfs_efi_zone;
166 extern kmem_zone_t *xfs_buf_item_zone;
167 extern kmem_zone_t *xfs_icluster_zone; 156 extern kmem_zone_t *xfs_icluster_zone;
168 157
169 xfs_cleanup_procfs(); 158 xfs_cleanup_procfs();