From patchwork Thu Apr 9 15:02:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peng Tao X-Patchwork-Id: 6188491 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5E9B79F2E9 for ; Thu, 9 Apr 2015 15:05:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 854CA2037B for ; Thu, 9 Apr 2015 15:05:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 16FFB20380 for ; Thu, 9 Apr 2015 15:05:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753719AbbDIPFT (ORCPT ); Thu, 9 Apr 2015 11:05:19 -0400 Received: from mail-pa0-f49.google.com ([209.85.220.49]:33281 "EHLO mail-pa0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753554AbbDIPFS (ORCPT ); Thu, 9 Apr 2015 11:05:18 -0400 Received: by paboj16 with SMTP id oj16so152600386pab.0 for ; Thu, 09 Apr 2015 08:05:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IGS/8o1IhQ7ClbS/yueWIScC/dow1OAqJb2ZOlw/YMo=; b=CVh4suxHUhGyBQKI4f5ZyKMtuWjqWQJJBoHr2CztMNJGnPzrCsUpleH5NIvVcXkyVX miCNdQwga+m27ap3lRLkpRxqI7K5k5AtxJBwyitRNltveE9P4u0OeEhGlxwhg2/30n6y pr0/RJ78+csXvOTIBohvTmGSv7VZXAePXSUDG0odQqVJG060s2mIe2Q0XZBmcnnWh3y+ BHQgU0piKNWhjq7pSjUk9MysmaQegM5Mg9mpLEgPESdkVCSz3RX26MoL15EMCSAGpC3f IXoiTtq7Gi9w9unLL78pfMxkAEgZYRmvxlcQ6YuTVUVF4dcE96ARxgOR4ORabJJAALfa 9Zdw== X-Gm-Message-State: ALoCoQk1JYuOZY1B54MnM00rb+PH+0o1R0cdrzj9xwNHjMIsxl9AE9PboauIFXNDV5vJRi6KnQEX X-Received: by 10.66.139.195 with SMTP id ra3mr56001388pab.21.1428591917969; Thu, 09 Apr 2015 08:05:17 -0700 (PDT) Received: from localhost.localdomain (ec2-54-65-164-9.ap-northeast-1.compute.amazonaws.com. [54.65.164.9]) by mx.google.com with ESMTPSA id ca17sm14840186pdb.95.2015.04.09.08.05.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 09 Apr 2015 08:05:17 -0700 (PDT) From: Peng Tao To: linux-nfs@vger.kernel.org Cc: Trond Myklebust , Peng Tao , , Weston Andros Adamson Subject: [PATCH v2 2/2] nfs: remove WARN_ON_ONCE from nfs_direct_good_bytes Date: Thu, 9 Apr 2015 23:02:17 +0800 Message-Id: <1428591737-19071-2-git-send-email-tao.peng@primarydata.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1428591737-19071-1-git-send-email-tao.peng@primarydata.com> References: <1428591737-19071-1-git-send-email-tao.peng@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: # v3.19+ Cc: Weston Andros Adamson Signed-off-by: Peng Tao --- This is updated due to conflict with patch 1/2. fs/nfs/direct.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 5e451a7..ab21ef1 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;