From patchwork Thu Jul 12 11:01:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 942913 X-Patchwork-Delegate: richard@nod.at Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=nod.at Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="O4Z1rJ9k"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41RCjH05yjz9rxx for ; Thu, 12 Jul 2018 21:03:31 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=TPJDZXNHueUtxuT7v3zx99MefGqB2OKNVM1+DbIoUUQ=; b=O4Z1rJ9kv4PpqAvHPIyuFtAmPp dr4fUX7bewzr2KB9q/CyUaBD9kULwADvGOJhEHGutPtoHYEZY1+sA42YyI3IW2Wvk4Y/bSQ8E8xBh y3JaTDK4CKj0+W3i4+T2VyEzQh7Bf2AUPO2fM2Llh8XgdzIDcFsVUQZHrZmkT85g88i9dBQCO2k5p 1WfZ6sbD8zeSB9mAuLGUOKG4vO21hx9H6FXOis39sN6IV2UpmWR/RJ8ajDflVPZTKQNAqbtY6ispO Wa1cHhFMqMJigJ0sHsNbBp7BM3HgBFz46mst3DNbx7N+EJCPblrgNArLlEn6tcw/KejhaK6QSSMo6 Dt/jlzAQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdZNa-0000EO-OK; Thu, 12 Jul 2018 11:03:22 +0000 Received: from lilium.sigma-star.at ([109.75.188.150]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdZMu-0007lR-DA for linux-mtd@lists.infradead.org; Thu, 12 Jul 2018 11:02:46 +0000 Received: from localhost (localhost [127.0.0.1]) by lilium.sigma-star.at (Postfix) with ESMTP id 6905418188FA2; Thu, 12 Jul 2018 13:02:18 +0200 (CEST) From: Richard Weinberger To: linux-mtd@lists.infradead.org Subject: [PATCH 1/5] ubifs: Turn two ubifs_assert() into a WARN_ON() Date: Thu, 12 Jul 2018 13:01:56 +0200 Message-Id: <20180712110200.13054-2-richard@nod.at> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180712110200.13054-1-richard@nod.at> References: <20180712110200.13054-1-richard@nod.at> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180712_040240_612743_6EFC3271 X-CRM114-Status: GOOD ( 11.30 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 T_SPF_PERMERROR SPF: test of record failed (permerror) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Weinberger , linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org We are going to pass struct ubifs_info to ubifs_assert() but while unloading the UBIFS module we don't have the info struct anymore. Therefore replace the asserts by a regular WARN_ON(). Signed-off-by: Richard Weinberger --- fs/ubifs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index c5466c70d620..90ebfcc8a8ea 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -2304,8 +2304,8 @@ late_initcall(ubifs_init); static void __exit ubifs_exit(void) { - ubifs_assert(list_empty(&ubifs_infos)); - ubifs_assert(atomic_long_read(&ubifs_clean_zn_cnt) == 0); + WARN_ON(list_empty(&ubifs_infos)); + WARN_ON(atomic_long_read(&ubifs_clean_zn_cnt) == 0); dbg_debugfs_exit(); ubifs_compressors_exit();