aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/direct.c3
-rw-r--r--fs/nfs/inode.c11
-rw-r--r--fs/nfs/mount_clnt.c2
-rw-r--r--fs/nfs/nfs2xdr.c2
-rw-r--r--fs/nfs/nfs3xdr.c2
-rw-r--r--fs/nfs/nfs4xdr.c2
6 files changed, 12 insertions, 10 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index cbef57a16ffb..0f583cb16ddb 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -898,7 +898,8 @@ int nfs_init_directcache(void)
898{ 898{
899 nfs_direct_cachep = kmem_cache_create("nfs_direct_cache", 899 nfs_direct_cachep = kmem_cache_create("nfs_direct_cache",
900 sizeof(struct nfs_direct_req), 900 sizeof(struct nfs_direct_req),
901 0, SLAB_RECLAIM_ACCOUNT, 901 0, (SLAB_RECLAIM_ACCOUNT|
902 SLAB_MEM_SPREAD),
902 NULL, NULL); 903 NULL, NULL);
903 if (nfs_direct_cachep == NULL) 904 if (nfs_direct_cachep == NULL)
904 return -ENOMEM; 905 return -ENOMEM;
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 60aac58270a8..2f7656b911b6 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -107,7 +107,7 @@ static struct rpc_version * nfs_version[] = {
107static struct rpc_program nfs_program = { 107static struct rpc_program nfs_program = {
108 .name = "nfs", 108 .name = "nfs",
109 .number = NFS_PROGRAM, 109 .number = NFS_PROGRAM,
110 .nrvers = sizeof(nfs_version) / sizeof(nfs_version[0]), 110 .nrvers = ARRAY_SIZE(nfs_version),
111 .version = nfs_version, 111 .version = nfs_version,
112 .stats = &nfs_rpcstat, 112 .stats = &nfs_rpcstat,
113 .pipe_dir_name = "/nfs", 113 .pipe_dir_name = "/nfs",
@@ -122,7 +122,7 @@ static struct rpc_version * nfsacl_version[] = {
122struct rpc_program nfsacl_program = { 122struct rpc_program nfsacl_program = {
123 .name = "nfsacl", 123 .name = "nfsacl",
124 .number = NFS_ACL_PROGRAM, 124 .number = NFS_ACL_PROGRAM,
125 .nrvers = sizeof(nfsacl_version) / sizeof(nfsacl_version[0]), 125 .nrvers = ARRAY_SIZE(nfsacl_version),
126 .version = nfsacl_version, 126 .version = nfsacl_version,
127 .stats = &nfsacl_rpcstat, 127 .stats = &nfsacl_rpcstat,
128}; 128};
@@ -1786,7 +1786,7 @@ static struct super_block *nfs_get_sb(struct file_system_type *fs_type,
1786 1786
1787 s->s_flags = flags; 1787 s->s_flags = flags;
1788 1788
1789 error = nfs_fill_super(s, data, flags & MS_VERBOSE ? 1 : 0); 1789 error = nfs_fill_super(s, data, flags & MS_SILENT ? 1 : 0);
1790 if (error) { 1790 if (error) {
1791 up_write(&s->s_umount); 1791 up_write(&s->s_umount);
1792 deactivate_super(s); 1792 deactivate_super(s);
@@ -2107,7 +2107,7 @@ static struct super_block *nfs4_get_sb(struct file_system_type *fs_type,
2107 2107
2108 s->s_flags = flags; 2108 s->s_flags = flags;
2109 2109
2110 error = nfs4_fill_super(s, data, flags & MS_VERBOSE ? 1 : 0); 2110 error = nfs4_fill_super(s, data, flags & MS_SILENT ? 1 : 0);
2111 if (error) { 2111 if (error) {
2112 up_write(&s->s_umount); 2112 up_write(&s->s_umount);
2113 deactivate_super(s); 2113 deactivate_super(s);
@@ -2276,7 +2276,8 @@ static int nfs_init_inodecache(void)
2276{ 2276{
2277 nfs_inode_cachep = kmem_cache_create("nfs_inode_cache", 2277 nfs_inode_cachep = kmem_cache_create("nfs_inode_cache",
2278 sizeof(struct nfs_inode), 2278 sizeof(struct nfs_inode),
2279 0, SLAB_RECLAIM_ACCOUNT, 2279 0, (SLAB_RECLAIM_ACCOUNT|
2280 SLAB_MEM_SPREAD),
2280 init_once, NULL); 2281 init_once, NULL);
2281 if (nfs_inode_cachep == NULL) 2282 if (nfs_inode_cachep == NULL)
2282 return -ENOMEM; 2283 return -ENOMEM;
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
index c44d87bdddb3..445abb4d4214 100644
--- a/fs/nfs/mount_clnt.c
+++ b/fs/nfs/mount_clnt.c
@@ -185,7 +185,7 @@ static struct rpc_stat mnt_stats;
185static struct rpc_program mnt_program = { 185static struct rpc_program mnt_program = {
186 .name = "mount", 186 .name = "mount",
187 .number = NFS_MNT_PROGRAM, 187 .number = NFS_MNT_PROGRAM,
188 .nrvers = sizeof(mnt_version)/sizeof(mnt_version[0]), 188 .nrvers = ARRAY_SIZE(mnt_version),
189 .version = mnt_version, 189 .version = mnt_version,
190 .stats = &mnt_stats, 190 .stats = &mnt_stats,
191}; 191};
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c
index 8cdc792ff3c7..f0015fa876e1 100644
--- a/fs/nfs/nfs2xdr.c
+++ b/fs/nfs/nfs2xdr.c
@@ -706,6 +706,6 @@ struct rpc_procinfo nfs_procedures[] = {
706 706
707struct rpc_version nfs_version2 = { 707struct rpc_version nfs_version2 = {
708 .number = 2, 708 .number = 2,
709 .nrprocs = sizeof(nfs_procedures)/sizeof(nfs_procedures[0]), 709 .nrprocs = ARRAY_SIZE(nfs_procedures),
710 .procs = nfs_procedures 710 .procs = nfs_procedures
711}; 711};
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
index 2d8701a230f0..ec233619687e 100644
--- a/fs/nfs/nfs3xdr.c
+++ b/fs/nfs/nfs3xdr.c
@@ -1140,7 +1140,7 @@ struct rpc_procinfo nfs3_procedures[] = {
1140 1140
1141struct rpc_version nfs_version3 = { 1141struct rpc_version nfs_version3 = {
1142 .number = 3, 1142 .number = 3,
1143 .nrprocs = sizeof(nfs3_procedures)/sizeof(nfs3_procedures[0]), 1143 .nrprocs = ARRAY_SIZE(nfs3_procedures),
1144 .procs = nfs3_procedures 1144 .procs = nfs3_procedures
1145}; 1145};
1146 1146
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index b95675349ba3..7c5d70efe720 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -4386,7 +4386,7 @@ struct rpc_procinfo nfs4_procedures[] = {
4386 4386
4387struct rpc_version nfs_version4 = { 4387struct rpc_version nfs_version4 = {
4388 .number = 4, 4388 .number = 4,
4389 .nrprocs = sizeof(nfs4_procedures)/sizeof(nfs4_procedures[0]), 4389 .nrprocs = ARRAY_SIZE(nfs4_procedures),
4390 .procs = nfs4_procedures 4390 .procs = nfs4_procedures
4391}; 4391};
4392 4392