From patchwork Thu Mar 15 02:57:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 886109 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=infradead.org header.i=@infradead.org header.b="s54FfBSN"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 401tYS10vvz9sT0 for ; Thu, 15 Mar 2018 13:57:31 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751739AbeCOC51 (ORCPT ); Wed, 14 Mar 2018 22:57:27 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:33976 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751556AbeCOC50 (ORCPT ); Wed, 14 Mar 2018 22:57:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Type:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=X2urv/yTA5Row2j3ZGtVvsZ1J5cdYQcRj3hPoHI8DPo=; b=s54FfBSNIyGhuS2UPDl01ti4vO yFV7eioGtqIER4pSPu4M81mL6nJOjNyXYSz5wVhtBLLgk8xfwHyRbBnDj6pNyx81HoO4fSOmXK/+F 5uPKt3tRP7pvUcRgtX+3YuwbH8Pt94O1D7B1AsjoGSDKnhsLEWOU0cwYV507yk3SLGTQBhya5eLTw YOv6DqxFuvrSDTbbWV+y8bdlUDRyzcM9pKmcRHrXA2ro2YSHj1JqKqFkhHNPzqpBPX6lBrUE+qT8w w3ubV+R57j9DMrbIzGuSUeBMo3MCma6kgwgO7PzJRFyoHnZ0WBMcScO37U3lhFNCAe1Pr38Weai3h w89WzHPQ==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1ewJ52-0000tV-9h; Thu, 15 Mar 2018 02:57:24 +0000 Date: Wed, 14 Mar 2018 19:57:24 -0700 From: Matthew Wilcox To: Saeed Mahameed , Matan Barak , Leon Romanovsky Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org Subject: [PATCH] mlx5: Remove call to ida_pre_get Message-ID: <20180315025724.GB9973@bombadil.infradead.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-15) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Matthew Wilcox The mlx5 driver calls ida_pre_get() in a loop for no readily apparent reason. The driver uses ida_simple_get() which will call ida_pre_get() by itself and there's no need to use ida_pre_get() unless using ida_get_new(). Signed-off-by: Matthew Wilcox diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index 10e16381f20a..3ba07c7096ef 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -1647,7 +1647,6 @@ try_add_to_existing_fg(struct mlx5_flow_table *ft, list_for_each_entry(iter, match_head, list) { nested_down_read_ref_node(&iter->g->node, FS_LOCK_PARENT); - ida_pre_get(&iter->g->fte_allocator, GFP_KERNEL); } search_again_locked: