2015-07-08 18:26:36

by Trond Myklebust

[permalink] [raw]
Subject: [PATCH] NFSv4.2/flexfiles: Fix a typo in the flexfiles layoutstats code

Signed-off-by: Trond Myklebust <[email protected]>
---
fs/nfs/flexfilelayout/flexfilelayout.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
index c12951b9551e..b3289d701eea 100644
--- a/fs/nfs/flexfilelayout/flexfilelayout.c
+++ b/fs/nfs/flexfilelayout/flexfilelayout.c
@@ -1852,7 +1852,7 @@ ff_layout_mirror_prepare_stats(struct nfs42_layoutstat_args *args,
struct nfs42_layoutstat_devinfo *devinfo;
int i;

- for (i = 0; i <= FF_LAYOUT_MIRROR_COUNT(pls); i++) {
+ for (i = 0; i < FF_LAYOUT_MIRROR_COUNT(pls); i++) {
if (*dev_count >= dev_limit)
break;
mirror = FF_LAYOUT_COMP(pls, i);
--
2.4.3



2015-07-08 18:50:57

by Jeff Layton

[permalink] [raw]
Subject: Re: [PATCH] NFSv4.2/flexfiles: Fix a typo in the flexfiles layoutstats code

On Wed, 8 Jul 2015 20:26:27 +0200
Trond Myklebust <[email protected]> wrote:

> Signed-off-by: Trond Myklebust <[email protected]>
> ---
> fs/nfs/flexfilelayout/flexfilelayout.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
> index c12951b9551e..b3289d701eea 100644
> --- a/fs/nfs/flexfilelayout/flexfilelayout.c
> +++ b/fs/nfs/flexfilelayout/flexfilelayout.c
> @@ -1852,7 +1852,7 @@ ff_layout_mirror_prepare_stats(struct nfs42_layoutstat_args *args,
> struct nfs42_layoutstat_devinfo *devinfo;
> int i;
>
> - for (i = 0; i <= FF_LAYOUT_MIRROR_COUNT(pls); i++) {
> + for (i = 0; i < FF_LAYOUT_MIRROR_COUNT(pls); i++) {
> if (*dev_count >= dev_limit)
> break;
> mirror = FF_LAYOUT_COMP(pls, i);

Reviewed-by: Jeff Layton <[email protected]>