This is a note to let you know that I've just added the patch titled [PATCH] Revert "btrfs: use proper endianness accessors for to the 4.14-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: revert-btrfs-use-proper-endianness-accessors-for.patch and it can be found in the queue-4.14 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From b9d4efbe7f9c675fb7571cee52d87bc33fb17788 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Date: Fri, 16 Mar 2018 15:00:50 +0100 Subject: [PATCH] Revert "btrfs: use proper endianness accessors for super_copy" This reverts commit 3c181c12c431fe33b669410d663beb9cceefcd1b as it causes breakage on big endian systems with btrfs images. Reported-by: Christoph Biedl <linux-kernel.bfrz@xxxxxxxxxxxxxxxxxx> Cc: Anand Jain <anand.jain@xxxxxxxxxx> Cc: Liu Bo <bo.li.liu@xxxxxxxxxx> Cc: David Sterba <dsterba@xxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/btrfs/sysfs.c | 8 +++++--- fs/btrfs/transaction.c | 20 ++++++++------------ 2 files changed, 13 insertions(+), 15 deletions(-) --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -422,7 +422,7 @@ static ssize_t btrfs_nodesize_show(struc { struct btrfs_fs_info *fs_info = to_fs_info(kobj); - return snprintf(buf, PAGE_SIZE, "%u\n", fs_info->nodesize); + return snprintf(buf, PAGE_SIZE, "%u\n", fs_info->super_copy->nodesize); } BTRFS_ATTR(nodesize, btrfs_nodesize_show); @@ -432,7 +432,8 @@ static ssize_t btrfs_sectorsize_show(str { struct btrfs_fs_info *fs_info = to_fs_info(kobj); - return snprintf(buf, PAGE_SIZE, "%u\n", fs_info->sectorsize); + return snprintf(buf, PAGE_SIZE, "%u\n", + fs_info->super_copy->sectorsize); } BTRFS_ATTR(sectorsize, btrfs_sectorsize_show); @@ -442,7 +443,8 @@ static ssize_t btrfs_clone_alignment_sho { struct btrfs_fs_info *fs_info = to_fs_info(kobj); - return snprintf(buf, PAGE_SIZE, "%u\n", fs_info->sectorsize); + return snprintf(buf, PAGE_SIZE, "%u\n", + fs_info->super_copy->sectorsize); } BTRFS_ATTR(clone_alignment, btrfs_clone_alignment_show); --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -1722,23 +1722,19 @@ static void update_super_roots(struct bt super = fs_info->super_copy; - /* update latest btrfs_super_block::chunk_root refs */ root_item = &fs_info->chunk_root->root_item; - btrfs_set_super_chunk_root(super, root_item->bytenr); - btrfs_set_super_chunk_root_generation(super, root_item->generation); - btrfs_set_super_chunk_root_level(super, root_item->level); + super->chunk_root = root_item->bytenr; + super->chunk_root_generation = root_item->generation; + super->chunk_root_level = root_item->level; - /* update latest btrfs_super_block::root refs */ root_item = &fs_info->tree_root->root_item; - btrfs_set_super_root(super, root_item->bytenr); - btrfs_set_super_generation(super, root_item->generation); - btrfs_set_super_root_level(super, root_item->level); - + super->root = root_item->bytenr; + super->generation = root_item->generation; + super->root_level = root_item->level; if (btrfs_test_opt(fs_info, SPACE_CACHE)) - btrfs_set_super_cache_generation(super, root_item->generation); + super->cache_generation = root_item->generation; if (test_bit(BTRFS_FS_UPDATE_UUID_TREE_GEN, &fs_info->flags)) - btrfs_set_super_uuid_tree_generation(super, - root_item->generation); + super->uuid_tree_generation = root_item->generation; } int btrfs_transaction_in_commit(struct btrfs_fs_info *info) Patches currently in stable-queue which might be from gregkh@xxxxxxxxxxxxxxxxxxx are queue-4.14/serial-sh-sci-prevent-lockup-on-full-tty-buffers.patch queue-4.14/serial-8250_pci-add-brainboxes-uc-260-4-port-serial-device.patch queue-4.14/usb-usbmon-read-text-within-supplied-buffer-size.patch queue-4.14/asoc-rt5651-fix-regcache-sync-errors-on-resume.patch queue-4.14/usb-gadget-f_fs-fix-use-after-free-in-ffs_fs_kill_sb.patch queue-4.14/asoc-sgtl5000-fix-suspend-resume.patch queue-4.14/usb-storage-add-jmicron-bridge-152d-2567-to-unusual_devs.h.patch queue-4.14/usb-quirks-add-control-message-delay-for-1b1c-1b20.patch queue-4.14/xhci-fix-front-usb-ports-on-asus-prime-b350m-a.patch queue-4.14/dm-mpath-fix-passing-integrity-data.patch queue-4.14/usb-host-xhci-rcar-add-support-for-r8a77965.patch queue-4.14/earlycon-add-reg-offset-to-physical-address-before-mapping.patch queue-4.14/asoc-sun4i-i2s-fix-rx-slot-number-of-sun8i.patch queue-4.14/staging-comedi-fix-comedi_nsamples_left.patch queue-4.14/net-phy-fix-resume-handling.patch queue-4.14/usbip-vudc-fix-null-pointer-dereference-on-udc-lock.patch queue-4.14/xhci-fix-endpoint-context-tracer-output.patch queue-4.14/x86-treat-r_x86_64_plt32-as-r_x86_64_pc32.patch queue-4.14/uas-fix-comparison-for-error-code.patch queue-4.14/asoc-wm_adsp-for-tlv-controls-only-register-tlv-get-set.patch queue-4.14/usb-dwc3-fix-lock-up-on-id-change-during-system-suspend-resume.patch queue-4.14/staging-android-ashmem-fix-lockdep-issue-during-llseek.patch queue-4.14/tty-serial-atmel-add-new-version-check-for-usart.patch queue-4.14/net-phy-restore-phy_resume-locking-assumption.patch queue-4.14/serial-core-mark-port-as-initialized-in-autoconfig.patch queue-4.14/revert-btrfs-use-proper-endianness-accessors-for.patch