aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2004-07-01 12:55:05 +0100
committerAnton Altaparmakov <aia21@cantab.net>2004-07-01 12:55:05 +0100
commit12db213604c53e19ae2d03c91fa13be2487fc1b0 (patch)
tree7d3e7b66b71c074c3b274c91174a39fd6f0aee42 /fs
parent3f4ab37c4786bc196abfbae917be0efcda518454 (diff)
parent33761bdbcb93c22a0708abe25a197e2d6cf830a5 (diff)
downloadhistory-12db213604c53e19ae2d03c91fa13be2487fc1b0.tar.gz
Merge cantab.net:/home/src/bklinux-2.6
into cantab.net:/home/src/ntfs-2.6
Diffstat (limited to 'fs')
-rw-r--r--fs/dcookies.c2
-rw-r--r--fs/ext2/inode.c2
-rw-r--r--fs/ext3/dir.c22
-rw-r--r--fs/ext3/inode.c6
-rw-r--r--fs/ext3/namei.c16
-rw-r--r--fs/ext3/super.c6
-rw-r--r--fs/ext3/xattr.c4
-rw-r--r--fs/isofs/rock.c2
-rw-r--r--fs/jbd/commit.c2
-rw-r--r--fs/jbd/journal.c2
-rw-r--r--fs/jbd/revoke.c4
-rw-r--r--fs/jbd/transaction.c6
-rw-r--r--fs/lockd/xdr.c4
-rw-r--r--fs/nfsd/nfsctl.c2
-rw-r--r--fs/proc/kcore.c2
-rw-r--r--fs/proc/kmsg.c4
-rw-r--r--fs/proc/proc_tty.c10
-rw-r--r--fs/proc/root.c20
-rw-r--r--fs/xfs/linux-2.6/xfs_buf.c6
19 files changed, 63 insertions, 59 deletions
diff --git a/fs/dcookies.c b/fs/dcookies.c
index 70fd5f13874bca..8ecfe5ecb3c3ca 100644
--- a/fs/dcookies.c
+++ b/fs/dcookies.c
@@ -60,7 +60,7 @@ static size_t dcookie_hash(unsigned long dcookie)
static struct dcookie_struct * find_dcookie(unsigned long dcookie)
{
- struct dcookie_struct * found = 0;
+ struct dcookie_struct *found = NULL;
struct dcookie_struct * dcs;
struct list_head * pos;
struct list_head * list;
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 454cde6adbd861..694e6ee40690f2 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -133,7 +133,7 @@ static int ext2_alloc_block (struct inode * inode, unsigned long goal, int *err)
&ei->i_prealloc_count,
&ei->i_prealloc_block, err);
else
- result = ext2_new_block (inode, goal, 0, 0, err);
+ result = ext2_new_block(inode, goal, NULL, NULL, err);
}
#else
result = ext2_new_block (inode, goal, 0, 0, err);
diff --git a/fs/ext3/dir.c b/fs/ext3/dir.c
index 76ad9815fb20ab..b2bb908173714f 100644
--- a/fs/ext3/dir.c
+++ b/fs/ext3/dir.c
@@ -129,7 +129,7 @@ static int ext3_readdir(struct file * filp,
while (!error && !stored && filp->f_pos < inode->i_size) {
blk = (filp->f_pos) >> EXT3_BLOCK_SIZE_BITS(sb);
- bh = ext3_bread (0, inode, blk, 0, &err);
+ bh = ext3_bread(NULL, inode, blk, 0, &err);
if (!bh) {
ext3_error (sb, "ext3_readdir",
"directory #%lu contains a hole at offset %lu",
@@ -295,14 +295,14 @@ static void free_rb_tree_fname(struct rb_root *root)
kfree (old);
}
if (!parent)
- root->rb_node = 0;
+ root->rb_node = NULL;
else if (parent->rb_left == n)
- parent->rb_left = 0;
+ parent->rb_left = NULL;
else if (parent->rb_right == n)
- parent->rb_right = 0;
+ parent->rb_right = NULL;
n = parent;
}
- root->rb_node = 0;
+ root->rb_node = NULL;
}
@@ -313,9 +313,9 @@ struct dir_private_info *create_dir_info(loff_t pos)
p = kmalloc(sizeof(struct dir_private_info), GFP_KERNEL);
if (!p)
return NULL;
- p->root.rb_node = 0;
- p->curr_node = 0;
- p->extra_fname = 0;
+ p->root.rb_node = NULL;
+ p->curr_node = NULL;
+ p->extra_fname = NULL;
p->last_pos = 0;
p->curr_hash = pos2maj_hash(pos);
p->curr_minor_hash = pos2min_hash(pos);
@@ -447,8 +447,8 @@ static int ext3_dx_readdir(struct file * filp,
/* Some one has messed with f_pos; reset the world */
if (info->last_pos != filp->f_pos) {
free_rb_tree_fname(&info->root);
- info->curr_node = 0;
- info->extra_fname = 0;
+ info->curr_node = NULL;
+ info->extra_fname = NULL;
info->curr_hash = pos2maj_hash(filp->f_pos);
info->curr_minor_hash = pos2min_hash(filp->f_pos);
}
@@ -472,7 +472,7 @@ static int ext3_dx_readdir(struct file * filp,
*/
if ((!info->curr_node) ||
(filp->f_version != inode->i_version)) {
- info->curr_node = 0;
+ info->curr_node = NULL;
free_rb_tree_fname(&info->root);
filp->f_version = inode->i_version;
ret = ext3_htree_fill_tree(filp, info->curr_hash,
diff --git a/fs/ext3/inode.c b/fs/ext3/inode.c
index 8cb394f616baa3..909b7d9779f726 100644
--- a/fs/ext3/inode.c
+++ b/fs/ext3/inode.c
@@ -287,7 +287,7 @@ static int ext3_alloc_block (handle_t *handle,
&ei->i_prealloc_count,
&ei->i_prealloc_block, err);
else
- result = ext3_new_block (inode, goal, 0, 0, err);
+ result = ext3_new_block(inode, goal, NULL, NULL, err);
/*
* AKPM: this is somewhat sticky. I'm not surprised it was
* disabled in 2.2's ext3. Need to integrate b_committed_data
@@ -296,7 +296,7 @@ static int ext3_alloc_block (handle_t *handle,
*/
}
#else
- result = ext3_new_block (handle, inode, goal, 0, 0, err);
+ result = ext3_new_block(handle, inode, goal, NULL, NULL, err);
#endif
return result;
}
@@ -859,7 +859,7 @@ changed:
static int ext3_get_block(struct inode *inode, sector_t iblock,
struct buffer_head *bh_result, int create)
{
- handle_t *handle = 0;
+ handle_t *handle = NULL;
int ret;
if (create) {
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
index 4ee524bee217a5..36e5b4ec3daffb 100644
--- a/fs/ext3/namei.c
+++ b/fs/ext3/namei.c
@@ -604,7 +604,7 @@ int ext3_htree_fill_tree(struct file *dir_file, __u32 start_hash,
}
hinfo.hash = start_hash;
hinfo.minor_hash = 0;
- frame = dx_probe(0, dir_file->f_dentry->d_inode, &hinfo, frames, &err);
+ frame = dx_probe(NULL, dir_file->f_dentry->d_inode, &hinfo, frames, &err);
if (!frame)
return err;
@@ -930,7 +930,7 @@ static struct buffer_head * ext3_dx_find_entry(struct dentry *dentry,
struct inode *dir = dentry->d_parent->d_inode;
sb = dir->i_sb;
- if (!(frame = dx_probe (dentry, 0, &hinfo, frames, err)))
+ if (!(frame = dx_probe(dentry, NULL, &hinfo, frames, err)))
return NULL;
hash = hinfo.hash;
do {
@@ -956,7 +956,7 @@ static struct buffer_head * ext3_dx_find_entry(struct dentry *dentry,
brelse (bh);
/* Check to see if we should continue to search */
retval = ext3_htree_next_block(dir, hash, frame,
- frames, 0);
+ frames, NULL);
if (retval < 0) {
ext3_warning(sb, __FUNCTION__,
"error reading index page in directory #%lu",
@@ -1392,7 +1392,7 @@ static int ext3_add_entry (handle_t *handle, struct dentry *dentry,
bh = ext3_bread(handle, dir, block, 0, &retval);
if(!bh)
return retval;
- retval = add_dirent_to_buf(handle, dentry, inode, 0, bh);
+ retval = add_dirent_to_buf(handle, dentry, inode, NULL, bh);
if (retval != -ENOSPC)
return retval;
@@ -1429,7 +1429,7 @@ static int ext3_dx_add_entry(handle_t *handle, struct dentry *dentry,
struct ext3_dir_entry_2 *de;
int err;
- frame = dx_probe(dentry, 0, &hinfo, frames, &err);
+ frame = dx_probe(dentry, NULL, &hinfo, frames, &err);
if (!frame)
return err;
entries = frame->entries;
@@ -1443,9 +1443,9 @@ static int ext3_dx_add_entry(handle_t *handle, struct dentry *dentry,
if (err)
goto journal_error;
- err = add_dirent_to_buf(handle, dentry, inode, 0, bh);
+ err = add_dirent_to_buf(handle, dentry, inode, NULL, bh);
if (err != -ENOSPC) {
- bh = 0;
+ bh = NULL;
goto cleanup;
}
@@ -1537,7 +1537,7 @@ static int ext3_dx_add_entry(handle_t *handle, struct dentry *dentry,
if (!de)
goto cleanup;
err = add_dirent_to_buf(handle, dentry, inode, de, bh);
- bh = 0;
+ bh = NULL;
goto cleanup;
journal_error:
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index ad0977b1716ede..b50e468c1ca748 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -356,7 +356,7 @@ static int ext3_blkdev_remove(struct ext3_sb_info *sbi)
bdev = sbi->journal_bdev;
if (bdev) {
ret = ext3_blkdev_put(bdev);
- sbi->journal_bdev = 0;
+ sbi->journal_bdev = NULL;
}
return ret;
}
@@ -1201,7 +1201,7 @@ static unsigned long descriptor_loc(struct super_block *sb,
static int ext3_fill_super (struct super_block *sb, void *data, int silent)
{
struct buffer_head * bh;
- struct ext3_super_block *es = 0;
+ struct ext3_super_block *es = NULL;
struct ext3_sb_info *sbi;
unsigned long block;
unsigned long sb_block = get_sb_block(&data);
@@ -1473,7 +1473,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
#endif
INIT_LIST_HEAD(&sbi->s_orphan); /* unlinked but open files */
- sb->s_root = 0;
+ sb->s_root = NULL;
needs_recovery = (es->s_last_orphan != 0 ||
EXT3_HAS_INCOMPAT_FEATURE(sb,
diff --git a/fs/ext3/xattr.c b/fs/ext3/xattr.c
index e818beec46a5a4..163db30a214e85 100644
--- a/fs/ext3/xattr.c
+++ b/fs/ext3/xattr.c
@@ -786,8 +786,8 @@ ext3_xattr_set_handle2(handle_t *handle, struct inode *inode,
EXT3_SB(sb)->s_es->s_first_data_block) +
EXT3_I(inode)->i_block_group *
EXT3_BLOCKS_PER_GROUP(sb);
- int block = ext3_new_block(handle,
- inode, goal, 0, 0, &error);
+ int block = ext3_new_block(handle, inode, goal,
+ NULL, NULL, &error);
if (error)
goto cleanup;
ea_idebug(inode, "creating block %d", block);
diff --git a/fs/isofs/rock.c b/fs/isofs/rock.c
index df78cece6a7461..c09d4bd4b55a74 100644
--- a/fs/isofs/rock.c
+++ b/fs/isofs/rock.c
@@ -41,7 +41,7 @@
#define CONTINUE_DECLS \
int cont_extent = 0, cont_offset = 0, cont_size = 0; \
- void * buffer = 0
+ void *buffer = NULL
#define CHECK_CE \
{cont_extent = isonum_733(rr->u.CE.extent); \
diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c
index 72e56d62c3739b..a540c7f03da69f 100644
--- a/fs/jbd/commit.c
+++ b/fs/jbd/commit.c
@@ -362,7 +362,7 @@ write_out_data:
*/
commit_transaction->t_state = T_COMMIT;
- descriptor = 0;
+ descriptor = NULL;
bufs = 0;
while (commit_transaction->t_buffers) {
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
index 946eec5e1c31b6..1cf23ff17c4a07 100644
--- a/fs/jbd/journal.c
+++ b/fs/jbd/journal.c
@@ -1617,7 +1617,7 @@ static void journal_destroy_journal_head_cache(void)
{
J_ASSERT(journal_head_cache != NULL);
kmem_cache_destroy(journal_head_cache);
- journal_head_cache = 0;
+ journal_head_cache = NULL;
}
/*
diff --git a/fs/jbd/revoke.c b/fs/jbd/revoke.c
index 6bbd73644e8f1a..87cd0501dfb17d 100644
--- a/fs/jbd/revoke.c
+++ b/fs/jbd/revoke.c
@@ -187,9 +187,9 @@ int __init journal_init_revoke_caches(void)
void journal_destroy_revoke_caches(void)
{
kmem_cache_destroy(revoke_record_cache);
- revoke_record_cache = 0;
+ revoke_record_cache = NULL;
kmem_cache_destroy(revoke_table_cache);
- revoke_table_cache = 0;
+ revoke_table_cache = NULL;
}
/* Initialise the revoke table for a given journal to a given size. */
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c
index 21ddf0b28b73ca..149fac70deecbe 100644
--- a/fs/jbd/transaction.c
+++ b/fs/jbd/transaction.c
@@ -1480,7 +1480,7 @@ __blist_del_buffer(struct journal_head **list, struct journal_head *jh)
if (*list == jh) {
*list = jh->b_tnext;
if (*list == jh)
- *list = 0;
+ *list = NULL;
}
jh->b_tprev->b_tnext = jh->b_tnext;
jh->b_tnext->b_tprev = jh->b_tprev;
@@ -1499,7 +1499,7 @@ __blist_del_buffer(struct journal_head **list, struct journal_head *jh)
*/
void __journal_unfile_buffer(struct journal_head *jh)
{
- struct journal_head **list = 0;
+ struct journal_head **list = NULL;
transaction_t *transaction;
struct buffer_head *bh = jh2bh(jh);
@@ -1930,7 +1930,7 @@ int journal_invalidatepage(journal_t *journal,
void __journal_file_buffer(struct journal_head *jh,
transaction_t *transaction, int jlist)
{
- struct journal_head **list = 0;
+ struct journal_head **list = NULL;
int was_dirty = 0;
struct buffer_head *bh = jh2bh(jh);
diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c
index 5d4b339df1e5f3..a76c496a5f0dd8 100644
--- a/fs/lockd/xdr.c
+++ b/fs/lockd/xdr.c
@@ -190,7 +190,7 @@ nlm_encode_testres(u32 *p, struct nlm_res *resp)
s32 start, len;
if (!(p = nlm_encode_cookie(p, &resp->cookie)))
- return 0;
+ return NULL;
*p++ = resp->status;
if (resp->status == nlm_lck_denied) {
@@ -201,7 +201,7 @@ nlm_encode_testres(u32 *p, struct nlm_res *resp)
/* Encode owner handle. */
if (!(p = xdr_encode_netobj(p, &resp->lock.oh)))
- return 0;
+ return NULL;
start = loff_t_to_s32(fl->fl_start);
if (fl->fl_end == OFFSET_MAX)
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c
index 2b30f49b6f8ff9..9c9399258afd06 100644
--- a/fs/nfsd/nfsctl.c
+++ b/fs/nfsd/nfsctl.c
@@ -470,7 +470,7 @@ static int __init init_nfsd(void)
#ifdef CONFIG_NFSD_V4
nfsd_idmap_init(); /* Name to ID mapping */
#endif /* CONFIG_NFSD_V4 */
- if (proc_mkdir("fs/nfs", 0)) {
+ if (proc_mkdir("fs/nfs", NULL)) {
struct proc_dir_entry *entry;
entry = create_proc_entry("fs/nfs/exports", 0, NULL);
if (entry)
diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c
index 3b1f58300d365f..f7c0cda58f82ba 100644
--- a/fs/proc/kcore.c
+++ b/fs/proc/kcore.c
@@ -82,7 +82,7 @@ kclist_del(void *addr)
}
}
write_unlock(&kclist_lock);
- return 0;
+ return NULL;
}
static size_t get_kcore_size(int *nphdr, size_t *elf_buflen)
diff --git a/fs/proc/kmsg.c b/fs/proc/kmsg.c
index 211b1fe2a82562..10d37bf252060f 100644
--- a/fs/proc/kmsg.c
+++ b/fs/proc/kmsg.c
@@ -33,7 +33,7 @@ static int kmsg_release(struct inode * inode, struct file * file)
static ssize_t kmsg_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
- if ((file->f_flags & O_NONBLOCK) && !do_syslog(9, 0, 0))
+ if ((file->f_flags & O_NONBLOCK) && !do_syslog(9, NULL, 0))
return -EAGAIN;
return do_syslog(2, buf, count);
}
@@ -41,7 +41,7 @@ static ssize_t kmsg_read(struct file *file, char __user *buf,
static unsigned int kmsg_poll(struct file *file, poll_table *wait)
{
poll_wait(file, &log_wait, wait);
- if (do_syslog(9, 0, 0))
+ if (do_syslog(9, NULL, 0))
return POLLIN | POLLRDNORM;
return 0;
}
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c
index 401688e36559bf..a0d4404cc91686 100644
--- a/fs/proc/proc_tty.c
+++ b/fs/proc/proc_tty.c
@@ -217,7 +217,7 @@ void proc_tty_unregister_driver(struct tty_driver *driver)
remove_proc_entry(driver->driver_name, proc_tty_driver);
- driver->proc_entry = 0;
+ driver->proc_entry = NULL;
}
/*
@@ -226,18 +226,18 @@ void proc_tty_unregister_driver(struct tty_driver *driver)
void __init proc_tty_init(void)
{
struct proc_dir_entry *entry;
- if (!proc_mkdir("tty", 0))
+ if (!proc_mkdir("tty", NULL))
return;
- proc_tty_ldisc = proc_mkdir("tty/ldisc", 0);
+ proc_tty_ldisc = proc_mkdir("tty/ldisc", NULL);
/*
* /proc/tty/driver/serial reveals the exact character counts for
* serial links which is just too easy to abuse for inferring
* password lengths and inter-keystroke timings during password
* entry.
*/
- proc_tty_driver = proc_mkdir_mode("tty/driver", S_IRUSR | S_IXUSR, 0);
+ proc_tty_driver = proc_mkdir_mode("tty/driver", S_IRUSR | S_IXUSR, NULL);
- create_proc_read_entry("tty/ldiscs", 0, 0, tty_ldiscs_read_proc,NULL);
+ create_proc_read_entry("tty/ldiscs", 0, NULL, tty_ldiscs_read_proc, NULL);
entry = create_proc_entry("tty/drivers", 0, NULL);
if (entry)
entry->proc_fops = &proc_tty_drivers_operations;
diff --git a/fs/proc/root.c b/fs/proc/root.c
index bf4b5d299843b1..4ece27d0251489 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -52,29 +52,29 @@ void __init proc_root_init(void)
return;
}
proc_misc_init();
- proc_net = proc_mkdir("net", 0);
+ proc_net = proc_mkdir("net", NULL);
#ifdef CONFIG_SYSVIPC
- proc_mkdir("sysvipc", 0);
+ proc_mkdir("sysvipc", NULL);
#endif
#ifdef CONFIG_SYSCTL
- proc_sys_root = proc_mkdir("sys", 0);
+ proc_sys_root = proc_mkdir("sys", NULL);
#endif
#if defined(CONFIG_BINFMT_MISC) || defined(CONFIG_BINFMT_MISC_MODULE)
- proc_mkdir("sys/fs", 0);
- proc_mkdir("sys/fs/binfmt_misc", 0);
+ proc_mkdir("sys/fs", NULL);
+ proc_mkdir("sys/fs/binfmt_misc", NULL);
#endif
- proc_root_fs = proc_mkdir("fs", 0);
- proc_root_driver = proc_mkdir("driver", 0);
- proc_mkdir("fs/nfsd", 0); /* somewhere for the nfsd filesystem to be mounted */
+ proc_root_fs = proc_mkdir("fs", NULL);
+ proc_root_driver = proc_mkdir("driver", NULL);
+ proc_mkdir("fs/nfsd", NULL); /* somewhere for the nfsd filesystem to be mounted */
#if defined(CONFIG_SUN_OPENPROMFS) || defined(CONFIG_SUN_OPENPROMFS_MODULE)
/* just give it a mountpoint */
- proc_mkdir("openprom", 0);
+ proc_mkdir("openprom", NULL);
#endif
proc_tty_init();
#ifdef CONFIG_PROC_DEVICETREE
proc_device_tree_init();
#endif
- proc_bus = proc_mkdir("bus", 0);
+ proc_bus = proc_mkdir("bus", NULL);
}
static struct dentry *proc_root_lookup(struct inode * dir, struct dentry * dentry, struct nameidata *nd)
diff --git a/fs/xfs/linux-2.6/xfs_buf.c b/fs/xfs/linux-2.6/xfs_buf.c
index c0502471523114..ed8abf22dac92b 100644
--- a/fs/xfs/linux-2.6/xfs_buf.c
+++ b/fs/xfs/linux-2.6/xfs_buf.c
@@ -1614,6 +1614,7 @@ pagebuf_daemon(
{
struct list_head tmp;
unsigned long age;
+ xfs_buftarg_t *target;
xfs_buf_t *pb, *n;
/* Set up the thread */
@@ -1656,9 +1657,12 @@ pagebuf_daemon(
while (!list_empty(&tmp)) {
pb = list_entry(tmp.next, xfs_buf_t, pb_list);
+ target = pb->pb_target;
+
list_del_init(&pb->pb_list);
pagebuf_iostrategy(pb);
- blk_run_address_space(pb->pb_target->pbr_mapping);
+
+ blk_run_address_space(target->pbr_mapping);
}
if (as_list_len > 0)