]> git.hungrycats.org Git - linux/commitdiff
[PATCH] NFSD - new struct initialisers for nfsd
authorNeil Brown <neilb@cse.unsw.edu.au>
Wed, 24 Jul 2002 03:41:31 +0000 (20:41 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 24 Jul 2002 03:41:31 +0000 (20:41 -0700)
Heading Rusty off at the pass...

This also changes and array initialiser...

fs/nfsd/export.c
fs/nfsd/lockd.c
fs/nfsd/nfsctl.c
fs/nfsd/nfssvc.c
fs/nfsd/stats.c

index 6f72f241ea9b7d20456a52db8c10e094869018a8..aa7577b3a2039398d95a1a6bec1f6a9add23e67b 100644 (file)
@@ -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,
 };
 
 /*
index 04760c68df06e8a731c18371a0b82fa6165e5de1..80976cf922b7cbe6ac3ad46f1685f5152c0cdd29 100644 (file)
@@ -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 */
 };
 
 /*
index c54e67dd79d263f9bfa813c36d6fd7ec80ca8052..91c682c77496e5d1ee0c64c0c68cec3d62e3dcb4 100644 (file)
@@ -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)
index 797bbe7bc933d1e9a8c81b184d55e51ff93d69c8..6660b32d8775055fe8c13facf5ba499e8d913198 100644 (file)
@@ -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 */
 };
index 0d81423ac1631ff25d7563fab6d80cbe473076da..0a0211ea4f25c8a56e6221458718732f9e1326ed 100644 (file)
@@ -37,7 +37,7 @@
 
 struct nfsd_stats      nfsdstats;
 struct svc_stat                nfsd_svcstats = {
-       program:        &nfsd_program,
+       .program        = &nfsd_program,
 };
 
 static int