Commit 62b52f5c authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] use c99 initialisers in ext3

Convert ext3 to the C99 initialiser format.  From Rusty.
parent 502bff06
......@@ -31,10 +31,10 @@ static unsigned char ext3_filetype_table[] = {
static int ext3_readdir(struct file *, void *, filldir_t);
struct file_operations ext3_dir_operations = {
read: generic_read_dir,
readdir: ext3_readdir, /* we take BKL. needed?*/
ioctl: ext3_ioctl, /* BKL held */
fsync: ext3_sync_file, /* BKL held */
.read = generic_read_dir,
.readdir = ext3_readdir, /* we take BKL. needed?*/
.ioctl = ext3_ioctl, /* BKL held */
.fsync = ext3_sync_file, /* BKL held */
};
int ext3_check_dir_entry (const char * function, struct inode * dir,
......
......@@ -76,18 +76,18 @@ ext3_file_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
}
struct file_operations ext3_file_operations = {
llseek: generic_file_llseek, /* BKL held */
read: generic_file_read, /* BKL not held. Don't need */
write: ext3_file_write, /* BKL not held. Don't need */
ioctl: ext3_ioctl, /* BKL held */
mmap: generic_file_mmap,
open: ext3_open_file, /* BKL not held. Don't need */
release: ext3_release_file, /* BKL not held. Don't need */
fsync: ext3_sync_file, /* BKL held */
.llseek = generic_file_llseek, /* BKL held */
.read = generic_file_read, /* BKL not held. Don't need */
.write = ext3_file_write, /* BKL not held. Don't need */
.ioctl = ext3_ioctl, /* BKL held */
.mmap = generic_file_mmap,
.open = ext3_open_file, /* BKL not held. Don't need */
.release = ext3_release_file, /* BKL not held. Don't need */
.fsync = ext3_sync_file, /* BKL held */
};
struct inode_operations ext3_file_inode_operations = {
truncate: ext3_truncate, /* BKL held */
setattr: ext3_setattr, /* BKL held */
.truncate = ext3_truncate, /* BKL held */
.setattr = ext3_setattr, /* BKL held */
};
......@@ -1378,15 +1378,15 @@ static int ext3_releasepage(struct page *page, int wait)
struct address_space_operations ext3_aops = {
readpage: ext3_readpage, /* BKL not held. Don't need */
readpages: ext3_readpages, /* BKL not held. Don't need */
writepage: ext3_writepage, /* BKL not held. We take it */
sync_page: block_sync_page,
prepare_write: ext3_prepare_write, /* BKL not held. We take it */
commit_write: ext3_commit_write, /* BKL not held. We take it */
bmap: ext3_bmap, /* BKL held */
invalidatepage: ext3_invalidatepage, /* BKL not held. Don't need */
releasepage: ext3_releasepage, /* BKL not held. Don't need */
.readpage = ext3_readpage, /* BKL not held. Don't need */
.readpages = ext3_readpages, /* BKL not held. Don't need */
.writepage = ext3_writepage, /* BKL not held. We take it */
.sync_page = block_sync_page,
.prepare_write = ext3_prepare_write, /* BKL not held. We take it */
.commit_write = ext3_commit_write, /* BKL not held. We take it */
.bmap = ext3_bmap, /* BKL held */
.invalidatepage = ext3_invalidatepage, /* BKL not held. Don't need */
.releasepage = ext3_releasepage, /* BKL not held. Don't need */
};
/* For writeback mode, we can use mpage_writepages() */
......@@ -1405,16 +1405,16 @@ ext3_writepages(struct address_space *mapping, int *nr_to_write)
}
struct address_space_operations ext3_writeback_aops = {
readpage: ext3_readpage, /* BKL not held. Don't need */
readpages: ext3_readpages, /* BKL not held. Don't need */
writepage: ext3_writepage, /* BKL not held. We take it */
writepages: ext3_writepages, /* BKL not held. Don't need */
sync_page: block_sync_page,
prepare_write: ext3_prepare_write, /* BKL not held. We take it */
commit_write: ext3_commit_write, /* BKL not held. We take it */
bmap: ext3_bmap, /* BKL held */
invalidatepage: ext3_invalidatepage, /* BKL not held. Don't need */
releasepage: ext3_releasepage, /* BKL not held. Don't need */
.readpage = ext3_readpage, /* BKL not held. Don't need */
.readpages = ext3_readpages, /* BKL not held. Don't need */
.writepage = ext3_writepage, /* BKL not held. We take it */
.writepages = ext3_writepages, /* BKL not held. Don't need */
.sync_page = block_sync_page,
.prepare_write = ext3_prepare_write, /* BKL not held. We take it */
.commit_write = ext3_commit_write, /* BKL not held. We take it */
.bmap = ext3_bmap, /* BKL held */
.invalidatepage = ext3_invalidatepage, /* BKL not held. Don't need */
.releasepage = ext3_releasepage, /* BKL not held. Don't need */
};
/*
......
......@@ -1194,13 +1194,13 @@ static int ext3_rename (struct inode * old_dir, struct dentry *old_dentry,
* directories can handle most operations...
*/
struct inode_operations ext3_dir_inode_operations = {
create: ext3_create,
lookup: ext3_lookup,
link: ext3_link,
unlink: ext3_unlink,
symlink: ext3_symlink,
mkdir: ext3_mkdir,
rmdir: ext3_rmdir,
mknod: ext3_mknod,
rename: ext3_rename,
.create = ext3_create,
.lookup = ext3_lookup,
.link = ext3_link,
.unlink = ext3_unlink,
.symlink = ext3_symlink,
.mkdir = ext3_mkdir,
.rmdir = ext3_rmdir,
.mknod = ext3_mknod,
.rename = ext3_rename,
};
......@@ -489,24 +489,24 @@ static void destroy_inodecache(void)
}
static struct super_operations ext3_sops = {
alloc_inode: ext3_alloc_inode,
destroy_inode: ext3_destroy_inode,
read_inode: ext3_read_inode, /* BKL held */
write_inode: ext3_write_inode, /* BKL not held. Don't need */
dirty_inode: ext3_dirty_inode, /* BKL not held. We take it */
put_inode: ext3_put_inode, /* BKL not held. Don't need */
delete_inode: ext3_delete_inode, /* BKL not held. We take it */
put_super: ext3_put_super, /* BKL held */
write_super: ext3_write_super, /* BKL not held. We take it. Needed? */
write_super_lockfs: ext3_write_super_lockfs, /* BKL not held. Take it */
unlockfs: ext3_unlockfs, /* BKL not held. We take it */
statfs: ext3_statfs, /* BKL not held. */
remount_fs: ext3_remount, /* BKL held */
.alloc_inode = ext3_alloc_inode,
.destroy_inode = ext3_destroy_inode,
.read_inode = ext3_read_inode, /* BKL held */
.write_inode = ext3_write_inode, /* BKL not held. Don't need */
.dirty_inode = ext3_dirty_inode, /* BKL not held. We take it */
.put_inode = ext3_put_inode, /* BKL not held. Don't need */
.delete_inode = ext3_delete_inode, /* BKL not held. We take it */
.put_super = ext3_put_super, /* BKL held */
.write_super = ext3_write_super, /* BKL not held. We take it. Needed? */
.write_super_lockfs = ext3_write_super_lockfs, /* BKL not held. Take it */
.unlockfs = ext3_unlockfs, /* BKL not held. We take it */
.statfs = ext3_statfs, /* BKL not held. */
.remount_fs = ext3_remount, /* BKL held */
};
struct dentry *ext3_get_parent(struct dentry *child);
static struct export_operations ext3_export_ops = {
get_parent: ext3_get_parent,
.get_parent = ext3_get_parent,
};
......@@ -1770,11 +1770,11 @@ static struct super_block *ext3_get_sb(struct file_system_type *fs_type,
}
static struct file_system_type ext3_fs_type = {
owner: THIS_MODULE,
name: "ext3",
get_sb: ext3_get_sb,
kill_sb: kill_block_super,
fs_flags: FS_REQUIRES_DEV,
.owner = THIS_MODULE,
.name = "ext3",
.get_sb = ext3_get_sb,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
static int __init init_ext3_fs(void)
......
......@@ -34,6 +34,6 @@ static int ext3_follow_link(struct dentry *dentry, struct nameidata *nd)
}
struct inode_operations ext3_fast_symlink_inode_operations = {
readlink: ext3_readlink, /* BKL not held. Don't need */
follow_link: ext3_follow_link, /* BKL not held. Don't need */
.readlink = ext3_readlink, /* BKL not held. Don't need */
.follow_link = ext3_follow_link, /* BKL not held. Don't need */
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment