Commit 44ce4c74 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] NFSD - new struct initialisers for nfsd

Heading Rusty off at the pass...

This also changes and array initialiser...
parent 3d49915a
...@@ -701,10 +701,10 @@ static int e_show(struct seq_file *m, void *p) ...@@ -701,10 +701,10 @@ static int e_show(struct seq_file *m, void *p)
} }
struct seq_operations nfs_exports_op = { struct seq_operations nfs_exports_op = {
start: e_start, .start = e_start,
next: e_next, .next = e_next,
stop: e_stop, .stop = e_stop,
show: e_show, .show = e_show,
}; };
/* /*
......
...@@ -61,12 +61,12 @@ nlm_fclose(struct file *filp) ...@@ -61,12 +61,12 @@ nlm_fclose(struct file *filp)
} }
struct nlmsvc_binding nfsd_nlm_ops = { struct nlmsvc_binding nfsd_nlm_ops = {
exp_readlock: exp_readlock, /* lock export table for reading */ .exp_readlock = exp_readlock, /* lock export table for reading */
exp_unlock: exp_readunlock, /* unlock export table */ .exp_unlock = exp_readunlock, /* unlock export table */
exp_getclient: exp_getclient, /* look up NFS client */ .exp_getclient = exp_getclient, /* look up NFS client */
fopen: nlm_fopen, /* open file for locking */ .fopen = nlm_fopen, /* open file for locking */
fclose: nlm_fclose, /* close file */ .fclose = nlm_fclose, /* close file */
detach: exp_nlmdetach, /* lockd shutdown notification */ .detach = exp_nlmdetach, /* lockd shutdown notification */
}; };
/* /*
......
...@@ -114,14 +114,14 @@ static int TA_release(struct inode *inode, struct file *file) ...@@ -114,14 +114,14 @@ static int TA_release(struct inode *inode, struct file *file)
} }
static struct file_operations writer_ops = { static struct file_operations writer_ops = {
write: fs_write, .write = fs_write,
}; };
static struct file_operations reader_ops = { static struct file_operations reader_ops = {
write: fs_write, .write = fs_write,
read: TA_read, .read = TA_read,
open: TA_open, .open = TA_open,
release:TA_release, .release = TA_release,
}; };
extern struct seq_operations nfs_exports_op; extern struct seq_operations nfs_exports_op;
...@@ -130,10 +130,10 @@ static int exports_open(struct inode *inode, struct file *file) ...@@ -130,10 +130,10 @@ static int exports_open(struct inode *inode, struct file *file)
return seq_open(file, &nfs_exports_op); return seq_open(file, &nfs_exports_op);
} }
static struct file_operations exports_operations = { static struct file_operations exports_operations = {
open: exports_open, .open = exports_open,
read: seq_read, .read = seq_read,
llseek: seq_lseek, .llseek = seq_lseek,
release: seq_release, .release = seq_release,
}; };
/* /*
...@@ -305,7 +305,7 @@ static ssize_t write_getfd(struct file *file, const char *buf, size_t size) ...@@ -305,7 +305,7 @@ static ssize_t write_getfd(struct file *file, const char *buf, size_t size)
*/ */
static struct super_operations s_ops = { static struct super_operations s_ops = {
statfs: simple_statfs, .statfs = simple_statfs,
}; };
static int nfsd_fill_super(struct super_block * sb, void * data, int silent) static int nfsd_fill_super(struct super_block * sb, void * data, int silent)
...@@ -371,10 +371,10 @@ static struct super_block *nfsd_get_sb(struct file_system_type *fs_type, ...@@ -371,10 +371,10 @@ static struct super_block *nfsd_get_sb(struct file_system_type *fs_type,
} }
static struct file_system_type nfsd_fs_type = { static struct file_system_type nfsd_fs_type = {
owner: THIS_MODULE, .owner = THIS_MODULE,
name: "nfsd", .name = "nfsd",
get_sb: nfsd_get_sb, .get_sb = nfsd_get_sb,
kill_sb: kill_litter_super, .kill_sb = kill_litter_super,
}; };
static int __init init_nfsd(void) static int __init init_nfsd(void)
......
...@@ -324,35 +324,33 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp) ...@@ -324,35 +324,33 @@ nfsd_dispatch(struct svc_rqst *rqstp, u32 *statp)
} }
static struct svc_version nfsd_version2 = { static struct svc_version nfsd_version2 = {
vs_vers: 2, .vs_vers = 2,
vs_nproc: 18, .vs_nproc = 18,
vs_proc: nfsd_procedures2, .vs_proc = nfsd_procedures2,
vs_dispatch: nfsd_dispatch .vs_dispatch = nfsd_dispatch
}; };
#ifdef CONFIG_NFSD_V3 #ifdef CONFIG_NFSD_V3
static struct svc_version nfsd_version3 = { static struct svc_version nfsd_version3 = {
vs_vers: 3, .vs_vers = 3,
vs_nproc: 22, .vs_nproc = 22,
vs_proc: nfsd_procedures3, .vs_proc = nfsd_procedures3,
vs_dispatch: nfsd_dispatch .vs_dispatch = nfsd_dispatch
}; };
#endif #endif
static struct svc_version * nfsd_version[] = { static struct svc_version * nfsd_version[] = {
NULL, [2] = &nfsd_version2,
NULL,
&nfsd_version2,
#ifdef CONFIG_NFSD_V3 #ifdef CONFIG_NFSD_V3
&nfsd_version3, [3] = &nfsd_version3,
#endif #endif
}; };
#define NFSD_NRVERS (sizeof(nfsd_version)/sizeof(nfsd_version[0])) #define NFSD_NRVERS (sizeof(nfsd_version)/sizeof(nfsd_version[0]))
struct svc_program nfsd_program = { struct svc_program nfsd_program = {
pg_prog: NFS_PROGRAM, /* program number */ .pg_prog = NFS_PROGRAM, /* program number */
pg_lovers: 2, // version .pg_lovers = 2, // version
pg_hivers: NFSD_NRVERS-1, // range .pg_hivers = NFSD_NRVERS-1, // range
pg_nvers: NFSD_NRVERS, /* nr of entries in nfsd_version */ .pg_nvers = NFSD_NRVERS, /* nr of entries in nfsd_version */
pg_vers: nfsd_version, /* version table */ .pg_vers = nfsd_version, /* version table */
pg_name: "nfsd", /* program name */ .pg_name = "nfsd", /* program name */
pg_stats: &nfsd_svcstats, /* version table */ .pg_stats = &nfsd_svcstats, /* version table */
}; };
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
struct nfsd_stats nfsdstats; struct nfsd_stats nfsdstats;
struct svc_stat nfsd_svcstats = { struct svc_stat nfsd_svcstats = {
program: &nfsd_program, .program = &nfsd_program,
}; };
static int static int
......
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