Received: by 2002:a05:6a10:8395:0:0:0:0 with SMTP id n21csp540035pxh; Wed, 10 Nov 2021 05:47:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwlDM3is3ppH6m0t2LiJtnMQe6MUhXgu0Ho1p3QHpxXJVV0p7w1u8WTC+hz0T5XYYdZ13jO X-Received: by 2002:a17:903:285:b0:142:7a83:6dd2 with SMTP id j5-20020a170903028500b001427a836dd2mr15778156plr.59.1636552052629; Wed, 10 Nov 2021 05:47:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636552052; cv=none; d=google.com; s=arc-20160816; b=FxZVdgKpFMkIfPmVZVIEjdPv2Bmv96EeGAy9Fd2gMDtcqzX4/MyP23mz4qADefFI3I elZ54rvH2gweWSMnc75Ul+Zu7Rod9G3NtpZMxpIEiHYmYq+d+DKrRTPUwYo7NENm1if4 JA6QL4nOVZTjWaWZBgPyqMJv+q5pYKMc5L7T60WEX1xggi5KZZEhoq2dX0Z5hU2oCgCS O9cn6MwGFyIEd6jhRNobwB046bGxI9ZNtwnF8g+gSko2jce6+Tt6naNcQw9RBuckG2FS TCV41yPsQE6u22P+IzsqAcQK8nhLm7kOc5XvzZ5cG9VXWpQjuvfwTPAUIUU0PMlnRDsu QmRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:dkim-signature:dkim-signature:date; bh=mzJai93r+ZR/gProqThGByCGxin7/za36mQAiFwzR5Y=; b=WxwgNJnXyuQ7vMXVoGLO3xW4tBP9JVKdeXZUcvrV47O78obzapCaNsWa/oKEyhm7T7 n6XOBJvi19LnbiDNkv3iL8wXiy5tG2UZOnRApR59hZ33OzBAwVGNf+qb3dqA9aNxNdLA wJmLIF6w/cSALLvXA0V11xlReMKnhHx3a9jQYJho64Cxcpxcr8SREtXBHA2knwBIFmHu 0bp71akwe17KgBzCFsH7d1Bv3loNhNd1hj3pmyIr6K5mwr2l6MLOZBKuMH9apgT8/oth OBZqSllKqhLUxqcn7Z3/vCqafPSBWRaL657t71eDX1bG1mfrlQpkWc9ZeXe9xil0+yK7 fFdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=QRitoM4O; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d12si5566609plr.18.2021.11.10.05.47.10; Wed, 10 Nov 2021 05:47:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=QRitoM4O; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232005AbhKJNtc (ORCPT + 99 others); Wed, 10 Nov 2021 08:49:32 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:43186 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231526AbhKJNtb (ORCPT ); Wed, 10 Nov 2021 08:49:31 -0500 Date: Wed, 10 Nov 2021 14:46:40 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1636552002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=mzJai93r+ZR/gProqThGByCGxin7/za36mQAiFwzR5Y=; b=QRitoM4ON9c/eiQciJNr2KdA4q0sGOAjNPCRhQeGjv5iCIrTtKURTDPvsP/8yXR5aSJm+q r6UyDQ0MwoirA3z4I/Lz603hSoeyVOMcHmefIr31LzWNTxpL3WxX/9sc+4hbgiLLW682E5 ixbazbDp66FtsuLC1TD9H/3/FCm/qvY5wqMVmQqliPeMw4KNdSG5yJMxvcIeSWWIyXV/cS 6FP60Pbk4Nv95nT2PbeoiDdf67fAPrUV0yqi/N5D/lxFv+lT/BomABiBN2YOrtrtqmGaYB 7gVS6XI4V8GY6Xm8kLTGr+yjMFZYr7pkmB8RMJJ5/yYaMqc1WsN1O7F41m0Pig== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1636552002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=mzJai93r+ZR/gProqThGByCGxin7/za36mQAiFwzR5Y=; b=LQf6WXS0PwnYNBxN4fDbF0N3Uz3PnqBNkbWZbFRKlxl2cadzWXTK5KzigKwLb4E/KEfbtV wiVp/7KXHw+5nvBw== From: Sebastian Andrzej Siewior To: linux-ext4@vger.kernel.org Cc: Theodore Ts'o , Andreas Dilger , Thomas Gleixner Subject: [PATCH] ext4: Destroy ext4_fc_dentry_cachep kmemcache on module removal. Message-ID: <20211110134640.lyku5vklvdndw6uk@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org The kmemcache for ext4_fc_dentry_cachep remains registered after module removal. Destroy ext4_fc_dentry_cachep kmemcache on module removal. Fixes: aa75f4d3daaeb ("ext4: main fast-commit commit path") Signed-off-by: Sebastian Andrzej Siewior --- fs/ext4/ext4.h | 1 + fs/ext4/fast_commit.c | 5 +++++ fs/ext4/super.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h index 3825195539d74..c97860ef322db 100644 --- a/fs/ext4/ext4.h +++ b/fs/ext4/ext4.h @@ -2934,6 +2934,7 @@ bool ext4_fc_replay_check_excluded(struct super_block *sb, ext4_fsblk_t block); void ext4_fc_replay_cleanup(struct super_block *sb); int ext4_fc_commit(journal_t *journal, tid_t commit_tid); int __init ext4_fc_init_dentry_cache(void); +void ext4_fc_destroy_dentry_cache(void); /* mballoc.c */ extern const struct seq_operations ext4_mb_seq_groups_ops; diff --git a/fs/ext4/fast_commit.c b/fs/ext4/fast_commit.c index 8ea5a81e65548..1a43af302ecba 100644 --- a/fs/ext4/fast_commit.c +++ b/fs/ext4/fast_commit.c @@ -2185,3 +2185,8 @@ int __init ext4_fc_init_dentry_cache(void) return 0; } + +void ext4_fc_destroy_dentry_cache(void) +{ + kmem_cache_destroy(ext4_fc_dentry_cachep); +} diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 88d5d274a8684..eb2dfc2a19d33 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -6641,6 +6641,7 @@ static int __init ext4_init_fs(void) out: unregister_as_ext2(); unregister_as_ext3(); + ext4_fc_destroy_dentry_cache(); out05: destroy_inodecache(); out1: @@ -6667,6 +6668,7 @@ static void __exit ext4_exit_fs(void) unregister_as_ext2(); unregister_as_ext3(); unregister_filesystem(&ext4_fs_type); + ext4_fc_destroy_dentry_cache(); destroy_inodecache(); ext4_exit_mballoc(); ext4_exit_sysfs(); -- 2.33.1