summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Tao <tao.peng@primarydata.com>2015-04-09 23:02:17 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-05-06 22:04:06 +0200
commit5efdfc74ab7d8ccfce9f8517012e3962939c91fc (patch)
treee0b9a33bb1558a12f7547d12bd1bb281ad174f88
parentdcd8d0c80e86b8821c5a453b5bf782328d8580e1 (diff)
nfs: remove WARN_ON_ONCE from nfs_direct_good_bytes
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@primarydata.com> Cc: Weston Andros Adamson <dros@primarydata.com> Signed-off-by: Peng Tao <tao.peng@primarydata.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/nfs/direct.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
index 5e451a75132d..ab21ef16a11a 100644
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -129,8 +129,6 @@ nfs_direct_good_bytes(struct nfs_direct_req *dreq, struct nfs_pgio_header *hdr)
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;