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