Commit adaee16f authored by Dave Kleikamp's avatar Dave Kleikamp

JFS: Replace depreciated initializer syntax with C99 style.

Originally submitted by Art Haas.
Cleaned up by Christoph Hellwig.
parent 45066b76
......@@ -45,15 +45,6 @@ int jfs_fsync(struct file *file, struct dentry *dentry, int datasync)
return rc ? -EIO : 0;
}
struct file_operations jfs_file_operations = {
open: generic_file_open,
llseek: generic_file_llseek,
write: generic_file_write,
read: generic_file_read,
mmap: generic_file_mmap,
fsync: jfs_fsync,
};
/*
* Guts of jfs_truncate. Called with locks already held. Can be called
* with directory for truncating directory index table.
......@@ -98,5 +89,14 @@ static void jfs_truncate(struct inode *ip)
}
struct inode_operations jfs_file_inode_operations = {
truncate: jfs_truncate,
.truncate = jfs_truncate,
};
struct file_operations jfs_file_operations = {
.open = generic_file_open,
.llseek = generic_file_llseek,
.write = generic_file_write,
.read = generic_file_read,
.mmap = generic_file_mmap,
.fsync = jfs_fsync,
};
......@@ -300,11 +300,11 @@ static int jfs_direct_IO(int rw, struct inode *inode, char *buf,
}
struct address_space_operations jfs_aops = {
readpage: jfs_readpage,
writepage: jfs_writepage,
sync_page: block_sync_page,
prepare_write: jfs_prepare_write,
commit_write: generic_commit_write,
bmap: jfs_bmap,
direct_IO: jfs_direct_IO,
.readpage = jfs_readpage,
.writepage = jfs_writepage,
.sync_page = block_sync_page,
.prepare_write = jfs_prepare_write,
.commit_write = generic_commit_write,
.bmap = jfs_bmap,
.direct_IO = jfs_direct_IO,
};
......@@ -1437,19 +1437,19 @@ struct dentry *jfs_get_parent(struct dentry *dentry)
}
struct inode_operations jfs_dir_inode_operations = {
create: jfs_create,
lookup: jfs_lookup,
link: jfs_link,
unlink: jfs_unlink,
symlink: jfs_symlink,
mkdir: jfs_mkdir,
rmdir: jfs_rmdir,
mknod: jfs_mknod,
rename: jfs_rename,
.create = jfs_create,
.lookup = jfs_lookup,
.link = jfs_link,
.unlink = jfs_unlink,
.symlink = jfs_symlink,
.mkdir = jfs_mkdir,
.rmdir = jfs_rmdir,
.mknod = jfs_mknod,
.rename = jfs_rename,
};
struct file_operations jfs_dir_operations = {
read: generic_read_dir,
readdir: jfs_readdir,
fsync: jfs_fsync,
.read = generic_read_dir,
.readdir = jfs_readdir,
.fsync = jfs_fsync,
};
......@@ -36,6 +36,10 @@ MODULE_LICENSE("GPL");
static kmem_cache_t * jfs_inode_cachep;
static struct super_operations jfs_super_operations;
static struct export_operations jfs_export_operations;
static struct file_system_type jfs_fs_type;
int jfs_stop_threads;
static pid_t jfsIOthread;
static pid_t jfsCommitThread;
......@@ -223,21 +227,6 @@ int jfs_remount(struct super_block *sb, int *flags, char *data)
return 0;
}
static struct super_operations jfs_super_operations = {
alloc_inode: jfs_alloc_inode,
destroy_inode: jfs_destroy_inode,
dirty_inode: jfs_dirty_inode,
write_inode: jfs_write_inode,
delete_inode: jfs_delete_inode,
put_super: jfs_put_super,
statfs: jfs_statfs,
remount_fs: jfs_remount,
};
static struct export_operations jfs_export_operations = {
get_parent: jfs_get_parent,
};
static int jfs_fill_super(struct super_block *sb, void *data, int silent)
{
struct jfs_sb_info *sbi;
......@@ -362,12 +351,27 @@ static struct super_block *jfs_get_sb(struct file_system_type *fs_type,
return get_sb_bdev(fs_type, flags, dev_name, data, jfs_fill_super);
}
static struct super_operations jfs_super_operations = {
.alloc_inode = jfs_alloc_inode,
.destroy_inode = jfs_destroy_inode,
.dirty_inode = jfs_dirty_inode,
.write_inode = jfs_write_inode,
.delete_inode = jfs_delete_inode,
.put_super = jfs_put_super,
.statfs = jfs_statfs,
.remount_fs = jfs_remount,
};
static struct export_operations jfs_export_operations = {
.get_parent = jfs_get_parent,
};
static struct file_system_type jfs_fs_type = {
owner: THIS_MODULE,
name: "jfs",
get_sb: jfs_get_sb,
kill_sb: kill_block_super,
fs_flags: FS_REQUIRES_DEV,
.owner = THIS_MODULE,
.name = "jfs",
.get_sb = jfs_get_sb,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
extern int metapage_init(void);
......
......@@ -19,17 +19,6 @@
#include <linux/fs.h>
#include "jfs_incore.h"
static int jfs_readlink(struct dentry *, char *buffer, int buflen);
static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd);
/*
* symlinks can't do much...
*/
struct inode_operations jfs_symlink_inode_operations = {
readlink: jfs_readlink,
follow_link: jfs_follow_link,
};
static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd)
{
char *s = JFS_IP(dentry->d_inode)->i_inline;
......@@ -41,3 +30,9 @@ static int jfs_readlink(struct dentry *dentry, char *buffer, int buflen)
char *s = JFS_IP(dentry->d_inode)->i_inline;
return vfs_readlink(dentry, buffer, buflen, s);
}
struct inode_operations jfs_symlink_inode_operations = {
.readlink = jfs_readlink,
.follow_link = jfs_follow_link,
};
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