fa59ce8
From: Peng Tao <tao.peng@primarydata.com>
fa59ce8
Date: Thu, 9 Apr 2015 23:02:17 +0800
fa59ce8
Subject: [PATCH] nfs: remove WARN_ON_ONCE from nfs_direct_good_bytes
fa59ce8
fa59ce8
For flexfiles driver, we might choose to read from mirror index other
fa59ce8
than 0 while mirror_count is always 1 for read.
fa59ce8
fa59ce8
Reported-by: Jean Spector <jean@primarydata.com>
fa59ce8
Cc: <stable@vger.kernel.org> # v3.19+
fa59ce8
Cc: Weston Andros Adamson <dros@primarydata.com>
fa59ce8
Signed-off-by: Peng Tao <tao.peng@primarydata.com>
fa59ce8
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fa59ce8
---
fa59ce8
 fs/nfs/direct.c | 2 --
fa59ce8
 1 file changed, 2 deletions(-)
fa59ce8
fa59ce8
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
fa59ce8
index 5e451a75132d..ab21ef16a11a 100644
fa59ce8
--- a/fs/nfs/direct.c
fa59ce8
+++ b/fs/nfs/direct.c
fa59ce8
@@ -129,8 +129,6 @@ nfs_direct_good_bytes(struct nfs_direct_req *dreq, struct nfs_pgio_header *hdr)
fa59ce8
 	int i;
fa59ce8
 	ssize_t count;
fa59ce8
 
fa59ce8
-	WARN_ON_ONCE(hdr->pgio_mirror_idx >= dreq->mirror_count);
fa59ce8
-
fa59ce8
 	if (dreq->mirror_count == 1) {
fa59ce8
 		dreq->mirrors[hdr->pgio_mirror_idx].count += hdr->good_bytes;
fa59ce8
 		dreq->count += hdr->good_bytes;
fa59ce8
-- 
fa59ce8
2.1.0
fa59ce8