]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Revert "btrfs: add dmesg output for first mount and last unmount of a filesystem"
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Dec 2023 14:52:30 +0000 (15:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2023 17:36:50 +0000 (18:36 +0100)
This reverts commit a480eb262b178e2baffa758b9cd5bde2d8470287 which is
commit 2db313205f8b96eea467691917138d646bb50aef upstream.

As pointed out by many, the disk_super structure is NOT initialized
before it is dereferenced in the function
fs/btrfs/disk-io.c:open_ctree() that this commit adds, so something went
wrong here.

Revert it for now until it gets straightened out.

Link: https://lore.kernel.org/r/5b0eb360-3765-40e1-854a-9da6d97eb405@roeck-us.net
Link: https://lore.kernel.org/r/20231209172836.GA2154579@dev-arch.thelio-3990X
Reported-by: Guenter Roeck <linux@roeck-us.net>
Reported-by: Nathan Chancellor <nathan@kernel.org>
Cc: Anand Jain <anand.jain@oracle.com>
Cc: Qu Wenruo <wqu@suse.com>
Cc: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/disk-io.c
fs/btrfs/super.c

index 24d10b541a135873e84a563d0a062205a122ba6b..f0654fe80b34691ecc23a7752ed7a9dc5c974059 100644 (file)
@@ -3204,7 +3204,6 @@ int __cold open_ctree(struct super_block *sb, struct btrfs_fs_devices *fs_device
                goto fail_alloc;
        }
 
-       btrfs_info(fs_info, "first mount of filesystem %pU", disk_super->fsid);
        /*
         * Verify the type first, if that or the checksum value are
         * corrupted, we'll find out
index 718119e3830db735d46ab9e45e98ed04d59c6f9c..2fd0ee0e6e9310c4a713b0b6cf45526c67d575f7 100644 (file)
@@ -337,10 +337,7 @@ void __btrfs_panic(struct btrfs_fs_info *fs_info, const char *function,
 
 static void btrfs_put_super(struct super_block *sb)
 {
-       struct btrfs_fs_info *fs_info = btrfs_sb(sb);
-
-       btrfs_info(fs_info, "last unmount of filesystem %pU", fs_info->fs_devices->fsid);
-       close_ctree(fs_info);
+       close_ctree(btrfs_sb(sb));
 }
 
 enum {