Skip to content

Commit

Permalink
Merge 'for-linus' branch of rsync://rsync.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/shaggy/jfs-2.6
  • Loading branch information
Linus Torvalds committed Jun 21, 2005
2 parents 1d345da + d039ba2 commit 9527cc7
Show file tree
Hide file tree
Showing 22 changed files with 100 additions and 201 deletions.
6 changes: 2 additions & 4 deletions fs/jfs/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ static struct posix_acl *jfs_get_acl(struct inode *inode, int type)
if (!IS_ERR(acl))
*p_acl = posix_acl_dup(acl);
}
if (value)
kfree(value);
kfree(value);
return acl;
}

Expand Down Expand Up @@ -112,8 +111,7 @@ static int jfs_set_acl(struct inode *inode, int type, struct posix_acl *acl)
}
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))
Expand Down
9 changes: 3 additions & 6 deletions fs/jfs/file.c
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -19,16 +19,13 @@

#include <linux/fs.h>
#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;
Expand Down
11 changes: 2 additions & 9 deletions fs/jfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,14 @@
#include <linux/pagemap.h>
#include <linux/quotaops.h>
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_filsys.h"
#include "jfs_imap.h"
#include "jfs_extent.h"
#include "jfs_unicode.h"
#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)) {
Expand Down Expand Up @@ -136,7 +129,7 @@ void jfs_delete_inode(struct inode *inode)
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);

Expand Down
10 changes: 0 additions & 10 deletions fs/jfs/jfs_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ void dump_mem(char *label, void *data, int length)

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)
{
Expand Down Expand Up @@ -97,14 +95,6 @@ static int loglevel_write(struct file *file, const char __user *buffer,
}
#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;
Expand Down
15 changes: 11 additions & 4 deletions fs/jfs/jfs_debug.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

/*
Expand Down Expand Up @@ -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 { \
Expand Down Expand Up @@ -110,6 +112,11 @@ extern void dump_mem(char *label, void *data, int length);
* ----------
*/
#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)))
Expand Down
9 changes: 0 additions & 9 deletions fs/jfs/jfs_dmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ int dbMount(struct inode *ipbmap)
int dbUnmount(struct inode *ipbmap, int mounterror)
{
struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap;
int i;

if (!(mounterror || isReadOnly(ipbmap)))
dbSync(ipbmap);
Expand All @@ -282,14 +281,6 @@ int dbUnmount(struct inode *ipbmap, int mounterror)
*/
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);

Expand Down
3 changes: 3 additions & 0 deletions fs/jfs/jfs_dtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -2931,6 +2931,9 @@ static void add_missing_indices(struct inode *inode, s64 bn)
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);
Expand Down
7 changes: 1 addition & 6 deletions fs/jfs/jfs_extent.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/fs.h>
#include <linux/quotaops.h>
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_superblock.h"
#include "jfs_dmap.h"
#include "jfs_extent.h"
Expand All @@ -33,12 +34,6 @@ static int extBrealloc(struct inode *, s64, s64, s64 *, s64 *);
#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) \
Expand Down
6 changes: 1 addition & 5 deletions fs/jfs/jfs_imap.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include <linux/quotaops.h>

#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_filsys.h"
#include "jfs_dinode.h"
#include "jfs_dmap.h"
Expand All @@ -68,11 +69,6 @@
#define AG_LOCK(imap,agno) down(&imap->im_aglock[agno])
#define AG_UNLOCK(imap,agno) up(&imap->im_aglock[agno])

/*
* external references
*/
extern struct address_space_operations jfs_aops;

/*
* forward references
*/
Expand Down
1 change: 1 addition & 0 deletions fs/jfs/jfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/fs.h>
#include <linux/quotaops.h>
#include "jfs_incore.h"
#include "jfs_inode.h"
#include "jfs_filsys.h"
#include "jfs_imap.h"
#include "jfs_dinode.h"
Expand Down
19 changes: 18 additions & 1 deletion fs/jfs/jfs_inode.h
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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 */
14 changes: 4 additions & 10 deletions fs/jfs/jfs_logmgr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -166,14 +167,6 @@ static LIST_HEAD(jfs_external_logs);
static struct jfs_log *dummy_log = NULL;
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
*/
Expand Down Expand Up @@ -1624,6 +1617,8 @@ void jfs_flush_journal(struct jfs_log *log, int wait)
}
}
assert(list_empty(&log->cqueue));

#ifdef CONFIG_JFS_DEBUG
if (!list_empty(&log->synclist)) {
struct logsyncblk *lp;

Expand All @@ -1638,9 +1633,8 @@ void jfs_flush_journal(struct jfs_log *log, int wait)
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);
}
Expand Down
2 changes: 2 additions & 0 deletions fs/jfs/jfs_logmgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,8 @@ extern int lmLogClose(struct super_block *sb);
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);

Expand Down
6 changes: 3 additions & 3 deletions fs/jfs/jfs_metapage.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags)
}
}

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);
}
Expand Down Expand Up @@ -726,12 +726,12 @@ void force_metapage(struct metapage *mp)
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 */
Expand Down
6 changes: 4 additions & 2 deletions fs/jfs/jfs_metapage.h
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -58,6 +58,8 @@ struct metapage {
#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);
Expand Down
11 changes: 11 additions & 0 deletions fs/jfs/jfs_superblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,16 @@ struct jfs_superblock {
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 */
Loading

0 comments on commit 9527cc7

Please sign in to comment.