summaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorZhang Yi <yi.zhang@huawei.com>2022-04-12 16:53:20 +0200
committerTheodore Ts'o <tytso@mit.edu>2022-05-13 23:00:39 +0200
commit4808cb5b98b436f1110d83c65541dd43beb45f63 (patch)
treebfd0d2bbec1c3920bf24a52da6563b203ec3e02e /fs/ext4/super.c
parentext4: remove unnecessary conditionals (diff)
downloadlinux-4808cb5b98b436f1110d83c65541dd43beb45f63.tar.xz
linux-4808cb5b98b436f1110d83c65541dd43beb45f63.zip
ext4: add unmount filesystem message
Now that we have kernel message at mount time, system administrator could acquire the mount time, device and options easily. But we don't have corresponding unmounting message at umount time, so we cannot know if someone umount a filesystem easily. Some of the modern filesystems (e.g. xfs) have the umounting kernel message, so add one for ext4 filesystem for convenience. EXT4-fs (sdb): mounted filesystem with ordered data mode. Quota mode: none. EXT4-fs (sdb): unmounting filesystem. Signed-off-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20220412145320.2669897-1-yi.zhang@huawei.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index b70ab3d3165d..b511203f7111 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1211,6 +1211,9 @@ static void ext4_put_super(struct super_block *sb)
*/
ext4_unregister_sysfs(sb);
+ if (___ratelimit(&ext4_mount_msg_ratelimit, "EXT4-fs unmount"))
+ ext4_msg(sb, KERN_INFO, "unmounting filesystem.");
+
ext4_unregister_li_request(sb);
ext4_quota_off_umount(sb);