From patchwork Mon Sep 21 15:18:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Vincent_Stehl=C3=A9?= X-Patchwork-Id: 7232211 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BA121BEEC1 for ; Mon, 21 Sep 2015 15:34:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D8210207AD for ; Mon, 21 Sep 2015 15:34:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AEE9020701 for ; Mon, 21 Sep 2015 15:34:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756901AbbIUPeG (ORCPT ); Mon, 21 Sep 2015 11:34:06 -0400 Received: from mail-bl2on0119.outbound.protection.outlook.com ([65.55.169.119]:58464 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753223AbbIUPeE (ORCPT ); Mon, 21 Sep 2015 11:34:04 -0400 Received: from BN3PR0301CA0032.namprd03.prod.outlook.com (10.160.180.170) by DM2PR0301MB1312.namprd03.prod.outlook.com (10.160.222.17) with Microsoft SMTP Server (TLS) id 15.1.268.17; Mon, 21 Sep 2015 15:18:42 +0000 Received: from BY2FFO11FD056.protection.gbl (2a01:111:f400:7c0c::151) by BN3PR0301CA0032.outlook.office365.com (2a01:111:e400:4000::42) with Microsoft SMTP Server (TLS) id 15.1.274.16 via Frontend Transport; Mon, 21 Sep 2015 15:18:41 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=freescale.com; kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=freescale.com; Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD056.mail.protection.outlook.com (10.1.15.193) with Microsoft SMTP Server (TLS) id 15.1.274.4 via Frontend Transport; Mon, 21 Sep 2015 15:18:40 +0000 Received: from laptop-vstehle (laptop-vstehle.ea.freescale.net [10.161.68.50]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id t8LFIb1T018954; Mon, 21 Sep 2015 08:18:38 -0700 Received: from vstehle by laptop-vstehle with local (Exim 4.86) (envelope-from ) id 1Ze2rU-0001mA-Ov; Mon, 21 Sep 2015 17:18:36 +0200 From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= To: CC: , =?UTF-8?q?Vincent=20Stehl=C3=A9?= , Oleg Nesterov , "Alexander Viro" , Subject: [PATCH] fs/super.c: use && instead of & for warn_on condition Date: Mon, 21 Sep 2015 17:18:34 +0200 Message-ID: <1442848714-6784-1-git-send-email-vincent.stehle@freescale.com> X-Mailer: git-send-email 2.5.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD056; 1:Z2BSS22k13HMCsjHWT6mvaSQLfHFQn+We2sI6S70AYauY3DR6B+z8SBmOsWoqciUJ6xvIltTZ3hgkl8mn/KKgN8azyNqTyqdXf9YFVrGCmj05rvrSGTtdR1MJ1UlWU1aCQtB/ujSAzIMPRUmZqO+2fZ8JpgLbISO6NG2uF/iUr9RSDoxbLmgkUblxQeE17ySECrM5D9rSImmHyd2QEOFvvMR1b0Oag7VW0uBgfDK47aZ6pz82rk8rszOzZQ3kshQB9xEA8yH+dWjiBChQwHA6MD/BgKu8LmNdEM0aqF/OB/RVqjBscGPNPAZs3ujRpcMTMKtOwdNNW8dW4CHNtm4pGzBGeEEp+BVBCu+kGV8UgzZQHhN0ZK2wJ3fqdt2HCjHY61FScLTeib7uOHPRPX7ww== X-Forefront-Antispam-Report: CIP:192.88.168.50; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(46102003)(57986006)(97736004)(50466002)(50986999)(62966003)(33646002)(83796002)(36756003)(23676002)(19580405001)(19580395003)(86362001)(16796002)(6806004)(50226001)(110136002)(5001860100001)(189998001)(5001960100002)(4001540100001)(47776003)(81156007)(87936001)(85426001)(229853001)(64706001)(5001830100001)(5007970100001)(92566002)(5820100001)(105606002)(46656002)(106466001)(2351001)(68736005)(77156002)(70036007); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR0301MB1312; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1312; 2:f8CcaLsv3U0DzvfqsXPIRQpgonXoX+R7HwNQsW5VdS1M+pROQ4OrKLzxevSAkwXFG5FW7EltXxpohTwEv0DD+bXwyhGtrIc+BwYsgXWD4Sop6lEUcKamggcQ+my2T0BsGj8uKs7964pPZp1C2cBN2TpTLevRAZZr4DnFhBgysJg=; 3:zV5iYPzFWkfzS/x1QF+Gjc5+WVf7DTi6ME7u9p4qAIuAx2ayFzNA3/UAyCRhp5brSm+C6n3+JG+p0uzibfcC8xeXt94YL3LX2loyqR05jD4se+zRQTBZOQd6ueuNJnFYFxx4fqxJDU9ReaB14zuO5dbIhBS/i+SSSJS8nNfK02BdzpzUPEJH7HIwB21c2gaEBxozymNUaicwetZosVy9dfKEc0sghkn+eO5aub72CG4=; 25:x6tF+44UU7H9f/M16JxBrU6A+FyZfxCW6Yijp8pWFk9qEn8886NmI9JgzfLoI4DRfRcVf9DXZ3VoyaJVGBoHU5DyAYpZmA4NiPv5IsoA4NFjRrcRHNU/VXv2YW/YuTydPyz9jgblUfs+u9OU7B2NGTWYLv8KprDDBR33YgCNESlTW0WubPuwTgF2zeUni2mbICqnQ36jCfGsOLQkZ3436ur8OnLFN8MiKXyV4E4D4TB4lcxoL/88Z4YrUYie4VmXKQBgDwF/mRZjh108jW0vdw== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1312; X-Microsoft-Exchange-Diagnostics: 1; DM2PR0301MB1312; 20:Dh0fCdP7gPWyeVpGBTwX7IySZIAPlkWlkzf9tGT1fBjMbH8fOOJMBC1/uOcqdZRIK+hyjf2qXxNgpb0v7S7tACIVa9Y/Aa3tjW2DwU76sa3G4/fJRvguhUxzOBDzBIv0Jo7UU5uGxu8LXnO4QCdDxj0FxiwZBAOWt4xSjYu8VujMiHbazzt6IkTUUbsH8Ljwl9q5b0ZUtBixzbWyJjMbF8HYrDWC5lBvhM10iVsgtsfWqDEKkR3RIQSHESaiiojjJNL6mXId3iQQP4KIFk9cYWQJi9MMvWBVVLnA2OyW9TJUIh46mQTNs7dQOBnYpj4lPOJSdwugHZbHqqHJDXBFJSlCyEGZHWbfpuCJlsw2QvQ=; 4:+K0FBMRPea7b8AQAXmW7NAH0I2Wy8A+WYtTo9xn4PNBaJ3CurOvj3FyME+lERVBsmvT8QNDBZRx+VNfpFyB8KqP3eSiZOq5xo9xDJxIQoZoOnkomH7hsOaexUGpdQtgEl89Lc584lrYkHCQYbe1NErl4urCAeZAw0oPMDme/+PbftbsT9b50AzhPkuQtTIZZmJJY+SzqKJq4mC3OoNow8V/onPjBIbt2xBhHE6Za1nNCQCYQzVB32F0XH9uS371Y0HMQ3WvP7CJZAH804U69edr1lrIIFXKB37l8HEcY8S7uoadX4SvSJXwgyPbRo3eWudtnAnRhIKCnRLjloqveP50euwJFnQ7i1Ie0zlLKUl8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(8121501046)(520078)(520075)(5005006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gynCNLmNPEh1fT0EYJAQol8HyG5EYqCsRwR9y+OcdUCVboM6A1B+czv4OK5XTvAv/4vM62mwzr6Ufsfg+1OzTVPZtU010ZcPl8+tCWJo4YzXYkHp1dmS+xSGqcaa3d3PA14d72Esuhh3gNUwrog==; 24:IAvh7Ex3ung0Q5obKYSUleIkJuplOvPI99zST/spbKmCAqqEAJR0/EmWdLCDp50wIy8ATjuq6kdQmCKeJgK0s0Z7rrmj6gacq4vic1kXdkc=; 20:0VzBVe4HYF9IIv3fOM74X4ERkBnP6TGQ0Kp/BuWA07pCAZX1I56Y7okUs9Sd/++it87grOKqNn+5mWKKeCEv4Q== X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Sep 2015 15:18:40.7845 (UTC) X-MS-Exchange-CrossTenant-Id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=710a03f5-10f6-4d38-9ff4-a80b81da590d; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB1312 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 This fixes the following sparse warning: fs/super.c:1202:9: warning: dubious: x & !y Bitwise and logical and are equivalent here, but logical was intended. The generated code is identical, with and without CONFIG_LOCKDEP. Signed-off-by: Vincent Stehlé Cc: Oleg Nesterov Cc: Alexander Viro Cc: trivial@kernel.org Acked-by: Oleg Nesterov --- fs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/super.c b/fs/super.c index 954aeb8..7ea56de 100644 --- a/fs/super.c +++ b/fs/super.c @@ -1199,7 +1199,7 @@ int __sb_start_write(struct super_block *sb, int level, bool wait) else ret = percpu_down_read_trylock(sb->s_writers.rw_sem + level-1); - WARN_ON(force_trylock & !ret); + WARN_ON(force_trylock && !ret); return ret; } EXPORT_SYMBOL(__sb_start_write);