Skip to contentSkip to conversation

NFSv4.2/flexfiles: Fix a typo in the flexfiles layoutstats code

PATCH In review Trond Myklebust 2 participants 2 messages Jul 8, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFSv4.2/flexfiles: Fix a typo in the flexfiles layoutstats code

---
 fs/nfs/flexfilelayout/flexfilelayout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/flexfilelayout/flexfilelayout.c +1 -1
index c12951b9551e..b3289d701eea 100644
@@ -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);
Signature · 1 line
2.4.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 10 lines · On Wed, 8 Jul 2015 20:26:27 +0200 Trond Myklebust…
---
 fs/nfs/flexfilelayout/flexfilelayout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfs/flexfilelayout/flexfilelayout.c +0 -0
index c12951b9551e..b3289d701eea 100644

fs/nfs/flexfilelayout/flexfilelayout.c ff_layout_mirror_prepare_stats(struct nfs42_layoutstat_args *args, · line 1858

Quoted 8 lines
fs/nfs/flexfilelayout/flexfilelayout.c +1 -1
@@ -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);