Index: fs/jfs/acl.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/acl.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/acl.c (mode:100644) @@ -70,8 +70,7 @@ if (!IS_ERR(acl)) *p_acl = posix_acl_dup(acl); } - if (value) - kfree(value); + kfree(value); return acl; } @@ -112,8 +111,7 @@ } rc = __jfs_setxattr(inode, ea_name, value, size, 0); out: - if (value) - kfree(value); + kfree(value); if (!rc) { if (*p_acl && (*p_acl != JFS_ACL_NOT_CACHED)) Index: fs/jfs/file.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/file.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/file.c (mode:100644) @@ -1,6 +1,6 @@ /* - * Copyright (c) International Business Machines Corp., 2000-2002 - * Portions Copyright (c) Christoph Hellwig, 2001-2002 + * Copyright (C) International Business Machines Corp., 2000-2002 + * Portions Copyright (C) Christoph Hellwig, 2001-2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,16 +19,13 @@ #include #include "jfs_incore.h" +#include "jfs_inode.h" #include "jfs_dmap.h" #include "jfs_txnmgr.h" #include "jfs_xattr.h" #include "jfs_acl.h" #include "jfs_debug.h" - -extern int jfs_commit_inode(struct inode *, int); -extern void jfs_truncate(struct inode *); - int jfs_fsync(struct file *file, struct dentry *dentry, int datasync) { struct inode *inode = dentry->d_inode; Index: fs/jfs/inode.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/inode.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/inode.c (mode:100644) @@ -23,6 +23,7 @@ #include #include #include "jfs_incore.h" +#include "jfs_inode.h" #include "jfs_filsys.h" #include "jfs_imap.h" #include "jfs_extent.h" @@ -30,14 +31,6 @@ #include "jfs_debug.h" -extern struct inode_operations jfs_dir_inode_operations; -extern struct inode_operations jfs_file_inode_operations; -extern struct inode_operations jfs_symlink_inode_operations; -extern struct file_operations jfs_dir_operations; -extern struct file_operations jfs_file_operations; -struct address_space_operations jfs_aops; -extern int freeZeroLink(struct inode *); - void jfs_read_inode(struct inode *inode) { if (diRead(inode)) { @@ -136,7 +129,7 @@ jfs_info("In jfs_delete_inode, inode = 0x%p", inode); if (test_cflag(COMMIT_Freewmap, inode)) - freeZeroLink(inode); + jfs_free_zero_link(inode); diFree(inode); Index: fs/jfs/jfs_debug.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_debug.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_debug.c (mode:100644) @@ -58,8 +58,6 @@ static struct proc_dir_entry *base; #ifdef CONFIG_JFS_DEBUG -extern read_proc_t jfs_txanchor_read; - static int loglevel_read(char *page, char **start, off_t off, int count, int *eof, void *data) { @@ -97,14 +95,6 @@ } #endif - -#ifdef CONFIG_JFS_STATISTICS -extern read_proc_t jfs_lmstats_read; -extern read_proc_t jfs_txstats_read; -extern read_proc_t jfs_xtstat_read; -extern read_proc_t jfs_mpstat_read; -#endif - static struct { const char *name; read_proc_t *read_fn; Index: fs/jfs/jfs_debug.h =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_debug.h (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_debug.h (mode:100644) @@ -1,6 +1,6 @@ /* - * Copyright (c) International Business Machines Corp., 2000-2002 - * Portions Copyright (c) Christoph Hellwig, 2001-2002 + * Copyright (C) International Business Machines Corp., 2000-2002 + * Portions Copyright (C) Christoph Hellwig, 2001-2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -31,7 +31,9 @@ * CONFIG_JFS_DEBUG or CONFIG_JFS_STATISTICS is defined */ #if defined(CONFIG_PROC_FS) && (defined(CONFIG_JFS_DEBUG) || defined(CONFIG_JFS_STATISTICS)) - #define PROC_FS_JFS +#define PROC_FS_JFS +extern void jfs_proc_init(void); +extern void jfs_proc_clean(void); #endif /* @@ -65,8 +67,8 @@ extern int jfsloglevel; -/* dump memory contents */ extern void dump_mem(char *label, void *data, int length); +extern int jfs_txanchor_read(char *, char **, off_t, int, int *, void *); /* information message: e.g., configuration, major event */ #define jfs_info(fmt, arg...) do { \ @@ -110,6 +112,11 @@ * ---------- */ #ifdef CONFIG_JFS_STATISTICS +extern int jfs_lmstats_read(char *, char **, off_t, int, int *, void *); +extern int jfs_txstats_read(char *, char **, off_t, int, int *, void *); +extern int jfs_mpstat_read(char *, char **, off_t, int, int *, void *); +extern int jfs_xtstat_read(char *, char **, off_t, int, int *, void *); + #define INCREMENT(x) ((x)++) #define DECREMENT(x) ((x)--) #define HIGHWATERMARK(x,y) ((x) = max((x), (y))) Index: fs/jfs/jfs_dmap.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_dmap.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_dmap.c (mode:100644) @@ -272,7 +272,6 @@ int dbUnmount(struct inode *ipbmap, int mounterror) { struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; - int i; if (!(mounterror || isReadOnly(ipbmap))) dbSync(ipbmap); @@ -282,14 +281,6 @@ */ truncate_inode_pages(ipbmap->i_mapping, 0); - /* - * Sanity Check - */ - for (i = 0; i < bmp->db_numag; i++) - if (atomic_read(&bmp->db_active[i])) - printk(KERN_ERR "dbUnmount: db_active[%d] = %d\n", - i, atomic_read(&bmp->db_active[i])); - /* free the memory for the in-memory bmap. */ kfree(bmp); Index: fs/jfs/jfs_dtree.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_dtree.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_dtree.c (mode:100644) @@ -2931,6 +2931,9 @@ ASSERT(p->header.flag & BT_LEAF); tlck = txLock(tid, inode, mp, tlckDTREE | tlckENTRY); + if (BT_IS_ROOT(mp)) + tlck->type |= tlckBTROOT; + dtlck = (struct dt_lock *) &tlck->lock; stbl = DT_GETSTBL(p); Index: fs/jfs/jfs_extent.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_extent.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_extent.c (mode:100644) @@ -19,6 +19,7 @@ #include #include #include "jfs_incore.h" +#include "jfs_inode.h" #include "jfs_superblock.h" #include "jfs_dmap.h" #include "jfs_extent.h" @@ -33,12 +34,6 @@ #endif static s64 extRoundDown(s64 nb); -/* - * external references - */ -extern int jfs_commit_inode(struct inode *, int); - - #define DPD(a) (printk("(a): %d\n",(a))) #define DPC(a) (printk("(a): %c\n",(a))) #define DPL1(a) \ Index: fs/jfs/jfs_imap.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_imap.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_imap.c (mode:100644) @@ -47,6 +47,7 @@ #include #include "jfs_incore.h" +#include "jfs_inode.h" #include "jfs_filsys.h" #include "jfs_dinode.h" #include "jfs_dmap.h" @@ -69,11 +70,6 @@ #define AG_UNLOCK(imap,agno) up(&imap->im_aglock[agno]) /* - * external references - */ -extern struct address_space_operations jfs_aops; - -/* * forward references */ static int diAllocAG(struct inomap *, int, boolean_t, struct inode *); Index: fs/jfs/jfs_inode.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_inode.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_inode.c (mode:100644) @@ -19,6 +19,7 @@ #include #include #include "jfs_incore.h" +#include "jfs_inode.h" #include "jfs_filsys.h" #include "jfs_imap.h" #include "jfs_dinode.h" Index: fs/jfs/jfs_inode.h =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_inode.h (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_inode.h (mode:100644) @@ -1,5 +1,5 @@ /* - * Copyright (c) International Business Machines Corp., 2000-2001 + * Copyright (C) International Business Machines Corp., 2000-2001 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,5 +19,22 @@ #define _H_JFS_INODE extern struct inode *ialloc(struct inode *, umode_t); +extern int jfs_fsync(struct file *, struct dentry *, int); +extern void jfs_read_inode(struct inode *); +extern int jfs_commit_inode(struct inode *, int); +extern int jfs_write_inode(struct inode*, int); +extern void jfs_delete_inode(struct inode *); +extern void jfs_dirty_inode(struct inode *); +extern void jfs_truncate(struct inode *); +extern void jfs_truncate_nolock(struct inode *, loff_t); +extern void jfs_free_zero_link(struct inode *); +extern struct dentry *jfs_get_parent(struct dentry *dentry); +extern struct address_space_operations jfs_aops; +extern struct inode_operations jfs_dir_inode_operations; +extern struct file_operations jfs_dir_operations; +extern struct inode_operations jfs_file_inode_operations; +extern struct file_operations jfs_file_operations; +extern struct inode_operations jfs_symlink_inode_operations; +extern struct dentry_operations jfs_ci_dentry_operations; #endif /* _H_JFS_INODE */ Index: fs/jfs/jfs_logmgr.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_logmgr.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_logmgr.c (mode:100644) @@ -71,6 +71,7 @@ #include "jfs_incore.h" #include "jfs_filsys.h" #include "jfs_metapage.h" +#include "jfs_superblock.h" #include "jfs_txnmgr.h" #include "jfs_debug.h" @@ -167,14 +168,6 @@ static DECLARE_MUTEX(jfs_log_sem); /* - * external references - */ -extern void txLazyUnlock(struct tblock * tblk); -extern int jfs_stop_threads; -extern struct completion jfsIOwait; -extern int jfs_tlocks_low; - -/* * forward references */ static int lmWriteRecord(struct jfs_log * log, struct tblock * tblk, @@ -1624,6 +1617,8 @@ } } assert(list_empty(&log->cqueue)); + +#ifdef CONFIG_JFS_DEBUG if (!list_empty(&log->synclist)) { struct logsyncblk *lp; @@ -1638,9 +1633,8 @@ dump_mem("orphan tblock", lp, sizeof(struct tblock)); } -// current->state = TASK_INTERRUPTIBLE; -// schedule(); } +#endif //assert(list_empty(&log->synclist)); clear_bit(log_FLUSH, &log->flag); } Index: fs/jfs/jfs_logmgr.h =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_logmgr.h (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_logmgr.h (mode:100644) @@ -507,6 +507,8 @@ extern int lmLogShutdown(struct jfs_log * log); extern int lmLogInit(struct jfs_log * log); extern int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize); +extern int lmGroupCommit(struct jfs_log *, struct tblock *); +extern int jfsIOWait(void *); extern void jfs_flush_journal(struct jfs_log * log, int wait); extern void jfs_syncpt(struct jfs_log *log); Index: fs/jfs/jfs_metapage.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_metapage.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_metapage.c (mode:100644) @@ -198,7 +198,7 @@ } } -static inline struct metapage *alloc_metapage(int gfp_mask) +static inline struct metapage *alloc_metapage(unsigned int gfp_mask) { return mempool_alloc(metapage_mempool, gfp_mask); } @@ -726,12 +726,12 @@ page_cache_release(page); } -extern void hold_metapage(struct metapage *mp) +void hold_metapage(struct metapage *mp) { lock_page(mp->page); } -extern void put_metapage(struct metapage *mp) +void put_metapage(struct metapage *mp) { if (mp->count || mp->nohomeok) { /* Someone else will release this */ Index: fs/jfs/jfs_metapage.h =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_metapage.h (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_metapage.h (mode:100644) @@ -1,6 +1,6 @@ /* - * Copyright (c) International Business Machines Corp., 2000-2002 - * Portions Copyright (c) Christoph Hellwig, 2001-2002 + * Copyright (C) International Business Machines Corp., 2000-2002 + * Portions Copyright (C) Christoph Hellwig, 2001-2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -58,6 +58,8 @@ #define mark_metapage_dirty(mp) set_bit(META_dirty, &(mp)->flag) /* function prototypes */ +extern int metapage_init(void); +extern void metapage_exit(void); extern struct metapage *__get_metapage(struct inode *inode, unsigned long lblock, unsigned int size, int absolute, unsigned long new); Index: fs/jfs/jfs_superblock.h =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_superblock.h (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_superblock.h (mode:100644) @@ -109,5 +109,16 @@ extern int readSuper(struct super_block *, struct buffer_head **); extern int updateSuper(struct super_block *, uint); extern void jfs_error(struct super_block *, const char *, ...); +extern int jfs_mount(struct super_block *); +extern int jfs_mount_rw(struct super_block *, int); +extern int jfs_umount(struct super_block *); +extern int jfs_umount_rw(struct super_block *); + +extern int jfs_stop_threads; +extern struct completion jfsIOwait; +extern wait_queue_head_t jfs_IO_thread_wait; +extern wait_queue_head_t jfs_commit_thread_wait; +extern wait_queue_head_t jfs_sync_thread_wait; +extern int jfs_extendfs(struct super_block *, s64, int); #endif /*_H_JFS_SUPERBLOCK */ Index: fs/jfs/jfs_txnmgr.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_txnmgr.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_txnmgr.c (mode:100644) @@ -42,7 +42,6 @@ * hold on to mp+lock thru update of maps */ - #include #include #include @@ -51,6 +50,7 @@ #include #include #include "jfs_incore.h" +#include "jfs_inode.h" #include "jfs_filsys.h" #include "jfs_metapage.h" #include "jfs_dinode.h" @@ -109,7 +109,6 @@ static int TxLockVHWM; /* Very High water mark */ struct tlock *TxLock; /* transaction lock table */ - /* * transaction management lock */ @@ -149,7 +148,6 @@ #define TXN_WAKEUP(event) wake_up_all(event) - /* * statistics */ @@ -161,16 +159,6 @@ int waitlock; /* 4: # of tlock wait */ } stattx; - -/* - * external references - */ -extern int lmGroupCommit(struct jfs_log *, struct tblock *); -extern int jfs_commit_inode(struct inode *, int); -extern int jfs_stop_threads; - -extern struct completion jfsIOwait; - /* * forward references */ @@ -358,7 +346,6 @@ TxBlock = NULL; } - /* * NAME: txBegin() * @@ -460,7 +447,6 @@ return t; } - /* * NAME: txBeginAnon() * @@ -503,7 +489,6 @@ TXN_UNLOCK(); } - /* * txEnd() * @@ -592,7 +577,6 @@ TXN_WAKEUP(&TxAnchor.freewait); } - /* * txLock() * @@ -868,7 +852,6 @@ return NULL; } - /* * NAME: txRelease() * @@ -908,7 +891,6 @@ TXN_UNLOCK(); } - /* * NAME: txUnlock() * @@ -996,7 +978,6 @@ } } - /* * txMaplock() * @@ -1069,7 +1050,6 @@ return tlck; } - /* * txLinelock() * @@ -1103,8 +1083,6 @@ return linelock; } - - /* * transaction commit management * ----------------------------- @@ -1373,7 +1351,6 @@ return rc; } - /* * NAME: txLog() * @@ -1437,7 +1414,6 @@ return rc; } - /* * diLog() * @@ -1465,7 +1441,6 @@ if (tlck->type & tlckENTRY) { /* log after-image for logredo(): */ lrd->type = cpu_to_le16(LOG_REDOPAGE); -// *pxd = mp->cm_pxd; PXDaddress(pxd, mp->index); PXDlength(pxd, mp->logical_size >> tblk->sb->s_blocksize_bits); @@ -1552,7 +1527,6 @@ return rc; } - /* * dataLog() * @@ -1599,7 +1573,6 @@ return 0; } - /* * dtLog() * @@ -1639,7 +1612,6 @@ lrd->log.redopage.type |= cpu_to_le16(LOG_EXTEND); else lrd->log.redopage.type |= cpu_to_le16(LOG_NEW); -// *pxd = mp->cm_pxd; PXDaddress(pxd, mp->index); PXDlength(pxd, mp->logical_size >> tblk->sb->s_blocksize_bits); @@ -1704,7 +1676,6 @@ return; } - /* * xtLog() * @@ -1760,7 +1731,6 @@ * applying the after-image to the meta-data page. */ lrd->type = cpu_to_le16(LOG_REDOPAGE); -// *page_pxd = mp->cm_pxd; PXDaddress(page_pxd, mp->index); PXDlength(page_pxd, mp->logical_size >> tblk->sb->s_blocksize_bits); @@ -2093,7 +2063,6 @@ return; } - /* * mapLog() * @@ -2180,7 +2149,6 @@ } } - /* * txEA() * @@ -2233,7 +2201,6 @@ } } - /* * txForce() * @@ -2300,7 +2267,6 @@ } } - /* * txUpdateMap() * @@ -2437,7 +2403,6 @@ } } - /* * txAllocPMap() * @@ -2509,7 +2474,6 @@ } } - /* * txFreeMap() * @@ -2611,7 +2575,6 @@ } } - /* * txFreelock() * @@ -2652,7 +2615,6 @@ TXN_UNLOCK(); } - /* * txAbort() * Index: fs/jfs/jfs_txnmgr.h =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/jfs_txnmgr.h (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/jfs_txnmgr.h (mode:100644) @@ -285,34 +285,26 @@ /* * external declarations */ -extern struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage *mp, - int flag); +extern int jfs_tlocks_low; -extern struct tlock *txMaplock(tid_t tid, struct inode *ip, int flag); - -extern int txCommit(tid_t tid, int nip, struct inode **iplist, int flag); - -extern tid_t txBegin(struct super_block *sb, int flag); - -extern void txBeginAnon(struct super_block *sb); - -extern void txEnd(tid_t tid); - -extern void txAbort(tid_t tid, int dirty); - -extern struct linelock *txLinelock(struct linelock * tlock); - -extern void txFreeMap(struct inode *ip, struct maplock * maplock, - struct tblock * tblk, int maptype); - -extern void txEA(tid_t tid, struct inode *ip, dxd_t * oldea, dxd_t * newea); - -extern void txFreelock(struct inode *ip); - -extern int lmLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, - struct tlock * tlck); - -extern void txQuiesce(struct super_block *sb); - -extern void txResume(struct super_block *sb); +extern int txInit(void); +extern void txExit(void); +extern struct tlock *txLock(tid_t, struct inode *, struct metapage *, int); +extern struct tlock *txMaplock(tid_t, struct inode *, int); +extern int txCommit(tid_t, int, struct inode **, int); +extern tid_t txBegin(struct super_block *, int); +extern void txBeginAnon(struct super_block *); +extern void txEnd(tid_t); +extern void txAbort(tid_t, int); +extern struct linelock *txLinelock(struct linelock *); +extern void txFreeMap(struct inode *, struct maplock *, struct tblock *, int); +extern void txEA(tid_t, struct inode *, dxd_t *, dxd_t *); +extern void txFreelock(struct inode *); +extern int lmLog(struct jfs_log *, struct tblock *, struct lrd *, + struct tlock *); +extern void txQuiesce(struct super_block *); +extern void txResume(struct super_block *); +extern void txLazyUnlock(struct tblock *); +extern int jfs_lazycommit(void *); +extern int jfs_sync(void *); #endif /* _H_JFS_TXNMGR */ Index: fs/jfs/namei.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/namei.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/namei.c (mode:100644) @@ -31,20 +31,9 @@ #include "jfs_acl.h" #include "jfs_debug.h" -extern struct inode_operations jfs_file_inode_operations; -extern struct inode_operations jfs_symlink_inode_operations; -extern struct file_operations jfs_file_operations; -extern struct address_space_operations jfs_aops; - -extern int jfs_fsync(struct file *, struct dentry *, int); -extern void jfs_truncate_nolock(struct inode *, loff_t); -extern int jfs_init_acl(struct inode *, struct inode *); - /* * forward references */ -struct inode_operations jfs_dir_inode_operations; -struct file_operations jfs_dir_operations; struct dentry_operations jfs_ci_dentry_operations; static s64 commitZeroLink(tid_t, struct inode *); @@ -655,7 +644,7 @@ /* - * NAME: freeZeroLink() + * NAME: jfs_free_zero_link() * * FUNCTION: for non-directory, called by iClose(), * free resources of a file from cache and WORKING map @@ -663,15 +652,12 @@ * while associated with a pager object, * * PARAMETER: ip - pointer to inode of file. - * - * RETURN: 0 -ok */ -int freeZeroLink(struct inode *ip) +void jfs_free_zero_link(struct inode *ip) { - int rc = 0; int type; - jfs_info("freeZeroLink: ip = 0x%p", ip); + jfs_info("jfs_free_zero_link: ip = 0x%p", ip); /* return if not reg or symbolic link or if size is * already ok. @@ -684,10 +670,10 @@ case S_IFLNK: /* if its contained in inode nothing to do */ if (ip->i_size < IDATASIZE) - return 0; + return; break; default: - return 0; + return; } /* @@ -737,9 +723,7 @@ * free xtree/data blocks from working block map; */ if (ip->i_size) - rc = xtTruncate(0, ip, 0, COMMIT_WMAP); - - return rc; + xtTruncate(0, ip, 0, COMMIT_WMAP); } /* Index: fs/jfs/super.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/super.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/super.c (mode:100644) @@ -28,6 +28,7 @@ #include "jfs_incore.h" #include "jfs_filsys.h" +#include "jfs_inode.h" #include "jfs_metapage.h" #include "jfs_superblock.h" #include "jfs_dmap.h" @@ -62,37 +63,6 @@ MODULE_PARM_DESC(jfsloglevel, "Specify JFS loglevel (0, 1 or 2)"); #endif -/* - * External declarations - */ -extern int jfs_mount(struct super_block *); -extern int jfs_mount_rw(struct super_block *, int); -extern int jfs_umount(struct super_block *); -extern int jfs_umount_rw(struct super_block *); - -extern int jfsIOWait(void *); -extern int jfs_lazycommit(void *); -extern int jfs_sync(void *); - -extern void jfs_read_inode(struct inode *inode); -extern void jfs_dirty_inode(struct inode *inode); -extern void jfs_delete_inode(struct inode *inode); -extern int jfs_write_inode(struct inode *inode, int wait); - -extern struct dentry *jfs_get_parent(struct dentry *dentry); -extern int jfs_extendfs(struct super_block *, s64, int); - -extern struct dentry_operations jfs_ci_dentry_operations; - -#ifdef PROC_FS_JFS /* see jfs_debug.h */ -extern void jfs_proc_init(void); -extern void jfs_proc_clean(void); -#endif - -extern wait_queue_head_t jfs_IO_thread_wait; -extern wait_queue_head_t jfs_commit_thread_wait; -extern wait_queue_head_t jfs_sync_thread_wait; - static void jfs_handle_error(struct super_block *sb) { struct jfs_sb_info *sbi = JFS_SBI(sb); @@ -593,11 +563,6 @@ .fs_flags = FS_REQUIRES_DEV, }; -extern int metapage_init(void); -extern int txInit(void); -extern void txExit(void); -extern void metapage_exit(void); - static void init_once(void *foo, kmem_cache_t * cachep, unsigned long flags) { struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo; Index: fs/jfs/symlink.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/symlink.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/symlink.c (mode:100644) @@ -1,5 +1,5 @@ /* - * Copyright (c) Christoph Hellwig, 2001-2002 + * Copyright (C) Christoph Hellwig, 2001-2002 * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ #include #include #include "jfs_incore.h" +#include "jfs_inode.h" #include "jfs_xattr.h" static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd) Index: fs/jfs/xattr.c =================================================================== --- 0e3d6de84b4ffa379c2c7ddcebd3f55de52b9844/fs/jfs/xattr.c (mode:100644) +++ abdf33dbbe33029ab81e7a209f11f29d2bc6b801/fs/jfs/xattr.c (mode:100644) @@ -946,8 +946,7 @@ out: up_write(&JFS_IP(inode)->xattr_sem); - if (os2name) - kfree(os2name); + kfree(os2name); return rc; } @@ -1042,8 +1041,7 @@ out: up_read(&JFS_IP(inode)->xattr_sem); - if (os2name) - kfree(os2name); + kfree(os2name); return size; }