Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2570150ybl; Thu, 29 Aug 2019 09:54:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwE91jpQnrCfMddtBPRb/Scw+iqfdpMx5cnORdLo7uYMeekRvBNI7mboWObwF8/1gtziDME X-Received: by 2002:a63:1749:: with SMTP id 9mr9456208pgx.0.1567097695895; Thu, 29 Aug 2019 09:54:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567097695; cv=none; d=google.com; s=arc-20160816; b=nE2rlrHIRleeSAZE+ZdZlRclWK1aThwchlVCuqPSfwTCr9e8dpJHG2RCeioxAn6Cma E65PIXSnjkgdNyMPEOp4gXBnBSUZa64U9n1R5441+mwEal7XJdaIj9SyPzXF4V8dqK8e KObEqZmCtigWpDjBco16x7d85JamIAuhxQHXjJtmtLv3l5oOpRLxm2OQ1K7PXX3km/Y0 aksL+yGx7YLvABh0tvFoCv5bok6nrDmU41KW1wf5p8U7f3k2eLa5wkcf2+uvrsKQymDm LNS5kWYvWH/miMcY76MidpIw/r3W28frVemCnzcVqXwnsz9s2c3Xi5inbq0cASBLa6xB 3uTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ax9lthaK3JhQ59ymHdiiPSvPPTi+y1ZSO3PCkFb2G5c=; b=IYrZC4iiNZLhJJ7fSGW7qcpPhoDTTIlb+nYp7ZndEPbOeUz7g5AsPFGCox2DtobnxO 9u8h5TMK5cqHN1608g1x3ZveWcSvHRfBlb8TDsO9WWrOOLEHBT1hsH8o6o/S/21/V2NH 2J7CLKT9g2l5whLprcvaMyQs8NzmZRoR6o2vjYnobEehkHzf7uPMzRlhZAy03aLw2nyl ZBvZC1/vOOE/BtACS5qz3y8yXrbatUk3LzKLVdFS6f5/ttfzvmOBM3kC6iVgus2a9+7x YildRj3R4eDcCLBrupFk6UkO+NgvTfZtSyschYk1KjwgIbpXhVLpX8IpXemFx+we3+IT HXHQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 2si2345379plb.372.2019.08.29.09.54.41; Thu, 29 Aug 2019 09:54:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728110AbfH2Qvc (ORCPT + 99 others); Thu, 29 Aug 2019 12:51:32 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:42135 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726973AbfH2Qva (ORCPT ); Thu, 29 Aug 2019 12:51:30 -0400 Received: by mail-wr1-f68.google.com with SMTP id b16so4136342wrq.9; Thu, 29 Aug 2019 09:51:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ax9lthaK3JhQ59ymHdiiPSvPPTi+y1ZSO3PCkFb2G5c=; b=ihD8QLtJevBClQBmt7qVK24jqzxyAW5XpySoXrPKXW+9LBP22kDWd4z7HKKtaA8vTj kjV6+TJ8gT+BApAlM/rtjIqzsFZYEIcaoUfEWiF5EZhVFZj+X3zlyUEEn5oJlKHxB90q re9S/3yf8dgCKuU1DJ6k55GUGBe1d7y+u4/SQtWaovWTptCU5q2i3K5aYzB3K7/uSLGh BYKXPUfSdsalFCsZyfuHHy67tF/z14PfZz1+FypFpuIR/DEeiGrLHOt+ra4ahY3SF+Ay Kv+xDPYbEcI8zuRVj1IsqsQDW4NhXduDkmcVtuuzlzBUcjButcp4g2fndiBBWl6aX7LR 60uw== X-Gm-Message-State: APjAAAWxfo45RmlAr/4RW1N64clRn5kbjFdhfR6vZuGeQS0SlHErPZMg FXQjoaxmZomub4Wl4647/ozDuf8e8sw= X-Received: by 2002:a05:6000:1189:: with SMTP id g9mr13825551wrx.51.1567097488358; Thu, 29 Aug 2019 09:51:28 -0700 (PDT) Received: from green.intra.ispras.ru (bran.ispras.ru. [83.149.199.196]) by smtp.googlemail.com with ESMTPSA id o14sm8340770wrg.64.2019.08.29.09.51.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Aug 2019 09:51:27 -0700 (PDT) From: Denis Efremov To: linux-kernel@vger.kernel.org Cc: Denis Efremov , Alexander Viro , Joe Perches , Andrew Morton , linux-fsdevel@vger.kernel.org Subject: [PATCH v3 05/11] fs: remove unlikely() from WARN_ON() condition Date: Thu, 29 Aug 2019 19:50:19 +0300 Message-Id: <20190829165025.15750-5-efremov@linux.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190829165025.15750-1-efremov@linux.com> References: <20190829165025.15750-1-efremov@linux.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "unlikely(WARN_ON(x))" is excessive. WARN_ON() already uses unlikely() internally. Signed-off-by: Denis Efremov Cc: Alexander Viro Cc: Joe Perches Cc: Andrew Morton Cc: linux-fsdevel@vger.kernel.org --- fs/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/open.c b/fs/open.c index a59abe3c669a..9432cd5a8294 100644 --- a/fs/open.c +++ b/fs/open.c @@ -776,7 +776,7 @@ static int do_dentry_open(struct file *f, f->f_mode |= FMODE_ATOMIC_POS; f->f_op = fops_get(inode->i_fop); - if (unlikely(WARN_ON(!f->f_op))) { + if (WARN_ON(!f->f_op)) { error = -ENODEV; goto cleanup_all; } -- 2.21.0