Skip to content

Commit

Permalink
Revert "btrfs: add dmesg output for first mount and last unmount of a…
Browse files Browse the repository at this point in the history
… filesystem"

This reverts commit a480eb2 which is
commit 2db3132 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/[email protected]
Link: https://lore.kernel.org/r/[email protected]
Reported-by: Guenter Roeck <[email protected]>
Reported-by: Nathan Chancellor <[email protected]>
Cc: Anand Jain <[email protected]>
Cc: Qu Wenruo <[email protected]>
Cc: David Sterba <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Dec 13, 2023
1 parent 1ed694f commit c7a0a26
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c7a0a26

Please sign in to comment.