summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/inode.c4
-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
5 files changed, 6 insertions, 6 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 37e55c328ebc..419d1d254f9f 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -103,7 +103,7 @@ static struct rpc_version * nfs_version[] = {
static struct rpc_program nfs_program = {
.name = "nfs",
.number = NFS_PROGRAM,
- .nrvers = sizeof(nfs_version) / sizeof(nfs_version[0]),
+ .nrvers = ARRAY_SIZE(nfs_version),
.version = nfs_version,
.stats = &nfs_rpcstat,
.pipe_dir_name = "/nfs",
@@ -118,7 +118,7 @@ static struct rpc_version * nfsacl_version[] = {
struct rpc_program nfsacl_program = {
.name = "nfsacl",
.number = NFS_ACL_PROGRAM,
- .nrvers = sizeof(nfsacl_version) / sizeof(nfsacl_version[0]),
+ .nrvers = ARRAY_SIZE(nfsacl_version),
.version = nfsacl_version,
.stats = &nfsacl_rpcstat,
};
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c
index db99b8f678f8..0b9a78353d6e 100644
--- a/fs/nfs/mount_clnt.c
+++ b/fs/nfs/mount_clnt.c
@@ -174,7 +174,7 @@ static struct rpc_stat mnt_stats;
static struct rpc_program mnt_program = {
.name = "mount",
.number = NFS_MNT_PROGRAM,
- .nrvers = sizeof(mnt_version)/sizeof(mnt_version[0]),
+ .nrvers = ARRAY_SIZE(mnt_version),
.version = mnt_version,
.stats = &mnt_stats,
};
diff --git a/fs/nfs/nfs2xdr.c b/fs/nfs/nfs2xdr.c
index 7fc0560c89c9..6548a65de944 100644
--- a/fs/nfs/nfs2xdr.c
+++ b/fs/nfs/nfs2xdr.c
@@ -704,6 +704,6 @@ struct rpc_procinfo nfs_procedures[] = {
struct rpc_version nfs_version2 = {
.number = 2,
- .nrprocs = sizeof(nfs_procedures)/sizeof(nfs_procedures[0]),
+ .nrprocs = ARRAY_SIZE(nfs_procedures),
.procs = nfs_procedures
};
diff --git a/fs/nfs/nfs3xdr.c b/fs/nfs/nfs3xdr.c
index b6c0b5012bce..5224a191efb6 100644
--- a/fs/nfs/nfs3xdr.c
+++ b/fs/nfs/nfs3xdr.c
@@ -1138,7 +1138,7 @@ struct rpc_procinfo nfs3_procedures[] = {
struct rpc_version nfs_version3 = {
.number = 3,
- .nrprocs = sizeof(nfs3_procedures)/sizeof(nfs3_procedures[0]),
+ .nrprocs = ARRAY_SIZE(nfs3_procedures),
.procs = nfs3_procedures
};
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c
index 4bbf5ef57785..0a1bd36a4837 100644
--- a/fs/nfs/nfs4xdr.c
+++ b/fs/nfs/nfs4xdr.c
@@ -4384,7 +4384,7 @@ struct rpc_procinfo nfs4_procedures[] = {
struct rpc_version nfs_version4 = {
.number = 4,
- .nrprocs = sizeof(nfs4_procedures)/sizeof(nfs4_procedures[0]),
+ .nrprocs = ARRAY_SIZE(nfs4_procedures),
.procs = nfs4_procedures
};