[PATCH 4.0 205/220] nfs: remove WARN_ON_ONCE from nfs_direct_good_bytes

From: Greg Kroah-Hartman
Date: Sat May 02 2015 - 16:54:32 EST


4.0-stable review patch. If anyone has any objections, please let me know.

------------------

From: Peng Tao <tao.peng@xxxxxxxxxxxxxxx>

commit 05f54903d9d370a4cd302a85681304d3ec59e5c1 upstream.

For flexfiles driver, we might choose to read from mirror index other
than 0 while mirror_count is always 1 for read.

Reported-by: Jean Spector <jean@xxxxxxxxxxxxxxx>
Cc: Weston Andros Adamson <dros@xxxxxxxxxxxxxxx>
Signed-off-by: Peng Tao <tao.peng@xxxxxxxxxxxxxxx>
Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
fs/nfs/direct.c | 2 --
1 file changed, 2 deletions(-)

--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -129,8 +129,6 @@ nfs_direct_good_bytes(struct nfs_direct_
int i;
ssize_t count;

- WARN_ON_ONCE(hdr->pgio_mirror_idx >= dreq->mirror_count);
-
if (dreq->mirror_count == 1) {
dreq->mirrors[hdr->pgio_mirror_idx].count += hdr->good_bytes;
dreq->count += hdr->good_bytes;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/