Commit f0fd4c1d authored by Art Haas's avatar Art Haas Committed by Linus Torvalds

[PATCH] named initializers for fs/hfs

parent 1b89d8d6
...@@ -59,30 +59,30 @@ const struct hfs_name hfs_cap_reserved2[] = { ...@@ -59,30 +59,30 @@ const struct hfs_name hfs_cap_reserved2[] = {
#define DOT_ROOTINFO (&hfs_cap_reserved2[0]) #define DOT_ROOTINFO (&hfs_cap_reserved2[0])
struct file_operations hfs_cap_dir_operations = { struct file_operations hfs_cap_dir_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: cap_readdir, .readdir = cap_readdir,
fsync: file_fsync, .fsync = file_fsync,
}; };
struct inode_operations hfs_cap_ndir_inode_operations = { struct inode_operations hfs_cap_ndir_inode_operations = {
create: hfs_create, .create = hfs_create,
lookup: cap_lookup, .lookup = cap_lookup,
unlink: hfs_unlink, .unlink = hfs_unlink,
mkdir: hfs_mkdir, .mkdir = hfs_mkdir,
rmdir: hfs_rmdir, .rmdir = hfs_rmdir,
rename: hfs_rename, .rename = hfs_rename,
setattr: hfs_notify_change, .setattr = hfs_notify_change,
}; };
struct inode_operations hfs_cap_fdir_inode_operations = { struct inode_operations hfs_cap_fdir_inode_operations = {
lookup: cap_lookup, .lookup = cap_lookup,
setattr: hfs_notify_change, .setattr = hfs_notify_change,
}; };
struct inode_operations hfs_cap_rdir_inode_operations = { struct inode_operations hfs_cap_rdir_inode_operations = {
create: hfs_create, .create = hfs_create,
lookup: cap_lookup, .lookup = cap_lookup,
setattr: hfs_notify_change, .setattr = hfs_notify_change,
}; };
/*================ File-local functions ================*/ /*================ File-local functions ================*/
......
...@@ -58,19 +58,19 @@ const struct hfs_name hfs_dbl_reserved2[] = { ...@@ -58,19 +58,19 @@ const struct hfs_name hfs_dbl_reserved2[] = {
#define PCNT_ROOTINFO (&hfs_dbl_reserved2[1]) #define PCNT_ROOTINFO (&hfs_dbl_reserved2[1])
struct file_operations hfs_dbl_dir_operations = { struct file_operations hfs_dbl_dir_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: dbl_readdir, .readdir = dbl_readdir,
fsync: file_fsync, .fsync = file_fsync,
}; };
struct inode_operations hfs_dbl_dir_inode_operations = { struct inode_operations hfs_dbl_dir_inode_operations = {
create: dbl_create, .create = dbl_create,
lookup: dbl_lookup, .lookup = dbl_lookup,
unlink: dbl_unlink, .unlink = dbl_unlink,
mkdir: dbl_mkdir, .mkdir = dbl_mkdir,
rmdir: dbl_rmdir, .rmdir = dbl_rmdir,
rename: dbl_rename, .rename = dbl_rename,
setattr: hfs_notify_change, .setattr = hfs_notify_change,
}; };
......
...@@ -64,27 +64,27 @@ const struct hfs_name hfs_nat_reserved2[] = { ...@@ -64,27 +64,27 @@ const struct hfs_name hfs_nat_reserved2[] = {
#define ROOTINFO (&hfs_nat_reserved2[0]) #define ROOTINFO (&hfs_nat_reserved2[0])
struct file_operations hfs_nat_dir_operations = { struct file_operations hfs_nat_dir_operations = {
read: generic_read_dir, .read = generic_read_dir,
readdir: nat_readdir, .readdir = nat_readdir,
fsync: file_fsync, .fsync = file_fsync,
}; };
struct inode_operations hfs_nat_ndir_inode_operations = { struct inode_operations hfs_nat_ndir_inode_operations = {
create: hfs_create, .create = hfs_create,
lookup: nat_lookup, .lookup = nat_lookup,
unlink: hfs_unlink, .unlink = hfs_unlink,
mkdir: hfs_mkdir, .mkdir = hfs_mkdir,
rmdir: nat_rmdir, .rmdir = nat_rmdir,
rename: hfs_rename, .rename = hfs_rename,
setattr: hfs_notify_change, .setattr = hfs_notify_change,
}; };
struct inode_operations hfs_nat_hdir_inode_operations = { struct inode_operations hfs_nat_hdir_inode_operations = {
create: hfs_create, .create = hfs_create,
lookup: nat_lookup, .lookup = nat_lookup,
unlink: nat_hdr_unlink, .unlink = nat_hdr_unlink,
rename: nat_hdr_rename, .rename = nat_hdr_rename,
setattr: hfs_notify_change, .setattr = hfs_notify_change,
}; };
/*================ File-local functions ================*/ /*================ File-local functions ================*/
......
...@@ -34,16 +34,16 @@ static void hfs_file_truncate(struct inode *); ...@@ -34,16 +34,16 @@ static void hfs_file_truncate(struct inode *);
/*================ Global variables ================*/ /*================ Global variables ================*/
struct file_operations hfs_file_operations = { struct file_operations hfs_file_operations = {
llseek: generic_file_llseek, .llseek = generic_file_llseek,
read: hfs_file_read, .read = hfs_file_read,
write: hfs_file_write, .write = hfs_file_write,
mmap: generic_file_mmap, .mmap = generic_file_mmap,
fsync: file_fsync, .fsync = file_fsync,
}; };
struct inode_operations hfs_file_inode_operations = { struct inode_operations hfs_file_inode_operations = {
truncate: hfs_file_truncate, .truncate = hfs_file_truncate,
setattr: hfs_notify_change, .setattr = hfs_notify_change,
}; };
/*================ Variable-like macros ================*/ /*================ Variable-like macros ================*/
......
...@@ -47,14 +47,14 @@ static hfs_rwret_t cap_info_write(struct file *, const char *, ...@@ -47,14 +47,14 @@ static hfs_rwret_t cap_info_write(struct file *, const char *,
/*================ Global variables ================*/ /*================ Global variables ================*/
struct file_operations hfs_cap_info_operations = { struct file_operations hfs_cap_info_operations = {
llseek: cap_info_llseek, .llseek = cap_info_llseek,
read: cap_info_read, .read = cap_info_read,
write: cap_info_write, .write = cap_info_write,
fsync: file_fsync, .fsync = file_fsync,
}; };
struct inode_operations hfs_cap_info_inode_operations = { struct inode_operations hfs_cap_info_inode_operations = {
setattr: hfs_notify_change_cap, .setattr = hfs_notify_change_cap,
}; };
/*================ File-local functions ================*/ /*================ File-local functions ================*/
......
...@@ -47,20 +47,20 @@ static hfs_rwret_t hdr_write(struct file *, const char *, ...@@ -47,20 +47,20 @@ static hfs_rwret_t hdr_write(struct file *, const char *,
/*================ Global variables ================*/ /*================ Global variables ================*/
struct file_operations hfs_hdr_operations = { struct file_operations hfs_hdr_operations = {
llseek: hdr_llseek, .llseek = hdr_llseek,
read: hdr_read, .read = hdr_read,
write: hdr_write, .write = hdr_write,
fsync: file_fsync, .fsync = file_fsync,
}; };
struct inode_operations hfs_hdr_inode_operations = { struct inode_operations hfs_hdr_inode_operations = {
setattr: hfs_notify_change_hdr, .setattr = hfs_notify_change_hdr,
}; };
const struct hfs_hdr_layout hfs_dbl_fil_hdr_layout = { const struct hfs_hdr_layout hfs_dbl_fil_hdr_layout = {
magic: __constant_htonl(HFS_DBL_MAGIC), /* magic */ .magic = __constant_htonl(HFS_DBL_MAGIC), /* magic */
version: __constant_htonl(HFS_HDR_VERSION_2), /* version */ .version = __constant_htonl(HFS_HDR_VERSION_2), /* version */
entries: 6, /* entries */ .entries = 6, /* entries */
{ /* descr[] */ { /* descr[] */
{HFS_HDR_FNAME, offsetof(struct hfs_dbl_hdr, real_name), ~0}, {HFS_HDR_FNAME, offsetof(struct hfs_dbl_hdr, real_name), ~0},
{HFS_HDR_DATES, offsetof(struct hfs_dbl_hdr, create_time), 16}, {HFS_HDR_DATES, offsetof(struct hfs_dbl_hdr, create_time), 16},
...@@ -80,9 +80,9 @@ const struct hfs_hdr_layout hfs_dbl_fil_hdr_layout = { ...@@ -80,9 +80,9 @@ const struct hfs_hdr_layout hfs_dbl_fil_hdr_layout = {
}; };
const struct hfs_hdr_layout hfs_dbl_dir_hdr_layout = { const struct hfs_hdr_layout hfs_dbl_dir_hdr_layout = {
magic: __constant_htonl(HFS_DBL_MAGIC), /* magic */ .magic = __constant_htonl(HFS_DBL_MAGIC), /* magic */
version: __constant_htonl(HFS_HDR_VERSION_2), /* version */ .version = __constant_htonl(HFS_HDR_VERSION_2), /* version */
entries: 5, /* entries */ .entries = 5, /* entries */
{ /* descr[] */ { /* descr[] */
{HFS_HDR_FNAME, offsetof(struct hfs_dbl_hdr, real_name), ~0}, {HFS_HDR_FNAME, offsetof(struct hfs_dbl_hdr, real_name), ~0},
{HFS_HDR_DATES, offsetof(struct hfs_dbl_hdr, create_time), 16}, {HFS_HDR_DATES, offsetof(struct hfs_dbl_hdr, create_time), 16},
...@@ -100,9 +100,9 @@ const struct hfs_hdr_layout hfs_dbl_dir_hdr_layout = { ...@@ -100,9 +100,9 @@ const struct hfs_hdr_layout hfs_dbl_dir_hdr_layout = {
}; };
const struct hfs_hdr_layout hfs_nat2_hdr_layout = { const struct hfs_hdr_layout hfs_nat2_hdr_layout = {
magic: __constant_htonl(HFS_DBL_MAGIC), /* magic */ .magic = __constant_htonl(HFS_DBL_MAGIC), /* magic */
version: __constant_htonl(HFS_HDR_VERSION_2), /* version */ .version = __constant_htonl(HFS_HDR_VERSION_2), /* version */
entries: 9, /* entries */ .entries = 9, /* entries */
{ /* descr[] */ { /* descr[] */
{HFS_HDR_FNAME, offsetof(struct hfs_dbl_hdr, real_name), ~0}, {HFS_HDR_FNAME, offsetof(struct hfs_dbl_hdr, real_name), ~0},
{HFS_HDR_COMNT, offsetof(struct hfs_dbl_hdr, comment), 0}, {HFS_HDR_COMNT, offsetof(struct hfs_dbl_hdr, comment), 0},
...@@ -128,9 +128,9 @@ const struct hfs_hdr_layout hfs_nat2_hdr_layout = { ...@@ -128,9 +128,9 @@ const struct hfs_hdr_layout hfs_nat2_hdr_layout = {
}; };
const struct hfs_hdr_layout hfs_nat_hdr_layout = { const struct hfs_hdr_layout hfs_nat_hdr_layout = {
magic: __constant_htonl(HFS_DBL_MAGIC), /* magic */ .magic = __constant_htonl(HFS_DBL_MAGIC), /* magic */
version: __constant_htonl(HFS_HDR_VERSION_1), /* version */ .version = __constant_htonl(HFS_HDR_VERSION_1), /* version */
entries: 5, /* entries */ .entries = 5, /* entries */
{ /* descr[] */ { /* descr[] */
{HFS_HDR_FNAME, offsetof(struct hfs_dbl_hdr, real_name), ~0}, {HFS_HDR_FNAME, offsetof(struct hfs_dbl_hdr, real_name), ~0},
{HFS_HDR_COMNT, offsetof(struct hfs_dbl_hdr, comment), 0}, {HFS_HDR_COMNT, offsetof(struct hfs_dbl_hdr, comment), 0},
......
...@@ -247,12 +247,12 @@ static int hfs_bmap(struct address_space *mapping, long block) ...@@ -247,12 +247,12 @@ static int hfs_bmap(struct address_space *mapping, long block)
return generic_block_bmap(mapping,block,hfs_get_block); return generic_block_bmap(mapping,block,hfs_get_block);
} }
struct address_space_operations hfs_aops = { struct address_space_operations hfs_aops = {
readpage: hfs_readpage, .readpage = hfs_readpage,
writepage: hfs_writepage, .writepage = hfs_writepage,
sync_page: block_sync_page, .sync_page = block_sync_page,
prepare_write: hfs_prepare_write, .prepare_write = hfs_prepare_write,
commit_write: generic_commit_write, .commit_write = generic_commit_write,
bmap: hfs_bmap .bmap = hfs_bmap
}; };
/* /*
......
...@@ -87,13 +87,13 @@ static void destroy_inodecache(void) ...@@ -87,13 +87,13 @@ static void destroy_inodecache(void)
/*================ Global variables ================*/ /*================ Global variables ================*/
static struct super_operations hfs_super_operations = { static struct super_operations hfs_super_operations = {
alloc_inode: hfs_alloc_inode, .alloc_inode = hfs_alloc_inode,
destroy_inode: hfs_destroy_inode, .destroy_inode = hfs_destroy_inode,
read_inode: hfs_read_inode, .read_inode = hfs_read_inode,
put_inode: hfs_put_inode, .put_inode = hfs_put_inode,
put_super: hfs_put_super, .put_super = hfs_put_super,
write_super: hfs_write_super, .write_super = hfs_write_super,
statfs: hfs_statfs, .statfs = hfs_statfs,
}; };
/*================ File-local variables ================*/ /*================ File-local variables ================*/
...@@ -105,11 +105,11 @@ static struct super_block *hfs_get_sb(struct file_system_type *fs_type, ...@@ -105,11 +105,11 @@ static struct super_block *hfs_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type hfs_fs = { static struct file_system_type hfs_fs = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "hfs", .name = "hfs",
get_sb: hfs_get_sb, .get_sb = hfs_get_sb,
kill_sb: kill_block_super, .kill_sb = kill_block_super,
fs_flags: FS_REQUIRES_DEV, .fs_flags = FS_REQUIRES_DEV,
}; };
/*================ File-local functions ================*/ /*================ File-local functions ================*/
......
...@@ -25,10 +25,10 @@ static int hfs_compare_dentry(struct dentry *, struct qstr *, struct qstr *); ...@@ -25,10 +25,10 @@ static int hfs_compare_dentry(struct dentry *, struct qstr *, struct qstr *);
static void hfs_dentry_iput(struct dentry *, struct inode *); static void hfs_dentry_iput(struct dentry *, struct inode *);
struct dentry_operations hfs_dentry_operations = struct dentry_operations hfs_dentry_operations =
{ {
d_revalidate: hfs_revalidate_dentry, .d_revalidate = hfs_revalidate_dentry,
d_hash: hfs_hash_dentry, .d_hash = hfs_hash_dentry,
d_compare: hfs_compare_dentry, .d_compare = hfs_compare_dentry,
d_iput: hfs_dentry_iput, .d_iput = hfs_dentry_iput,
}; };
/* /*
......
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