diff options
author | Marek Vasut | 2021-05-18 00:39:39 +0200 |
---|---|---|
committer | Tom Rini | 2021-05-26 17:26:07 -0400 |
commit | 9e8bb078859a559b17effdb21bafdb050b859b6e (patch) | |
tree | f3f1d25feb8b60e601bb9e6c22a193e2bb5c1a71 /fs | |
parent | 53ba2c21c2df142b37bb2f0d6850d79dcfd8976f (diff) |
fs: btrfs: Add missing cache aligned allocation
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 <marex@denx.de>
Cc: Marek BehĂșn <marek.behun@nic.cz>
Cc: Qu Wenruo <wqu@suse.com>
Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/disk-io.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index c6fdec95c16..349411c3ccd 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; |