Skip to content

Commit

Permalink
nfs: remove WARN_ON_ONCE from nfs_direct_good_bytes
Browse files Browse the repository at this point in the history
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: <stable@vger.kernel.org> # v3.19+
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>
  • Loading branch information
Peng Tao authored and Trond Myklebust committed Apr 23, 2015
1 parent 1ccbad9 commit 05f5490
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/nfs/direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 05f5490

Please sign in to comment.