From 9e8bb078859a559b17effdb21bafdb050b859b6e Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Tue, 18 May 2021 00:39:39 +0200 Subject: [PATCH] fs: btrfs: Add missing cache aligned allocation MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The superblock buffer must be cache aligned, since it might be used in DMA context, allocate it using ALLOC_CACHE_ALIGN_BUFFER() just like it was done in btrfs_read_superblock() and read_tree_node(). This fixes this output on boot and non-working btrfs on iMX53: CACHE: Misaligned operation at range [ced299d0, ced2a9d0] Signed-off-by: Marek Vasut Cc: Marek Behún Cc: Qu Wenruo Reviewed-by: Marek Behún --- fs/btrfs/disk-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index c6fdec95c1..349411c3cc 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -291,7 +291,7 @@ error_out: int btrfs_read_dev_super(struct blk_desc *desc, struct disk_partition *part, struct btrfs_super_block *sb) { - char tmp[BTRFS_SUPER_INFO_SIZE]; + ALLOC_CACHE_ALIGN_BUFFER(char, tmp, BTRFS_SUPER_INFO_SIZE); struct btrfs_super_block *buf = (struct btrfs_super_block *)tmp; int ret; -- 2.39.5