Skip to contentSkip to conversation

Patch "[PATCH] Revert "btrfs: use proper endianness accessors for" has been added to the 4.15-stable tree

PATCH [email protected] 1 participant 1 message Mar 16, 2018

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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.15-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.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From b9d4efbe7f9c675fb7571cee52d87bc33fb17788 Mon Sep 17 00:00:00 2001

From: Greg Kroah-Hartman <[email protected]>
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.

---
 fs/btrfs/sysfs.c       |    8 +++++---
 fs/btrfs/transaction.c |   20 ++++++++------------
 2 files changed, 13 insertions(+), 15 deletions(-)
fs/btrfs/sysfs.c +5 -3
@@ -423,7 +423,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);
@@ -433,7 +433,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);
@@ -443,7 +444,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);
fs/btrfs/transaction.c +8 -12
@@ -1723,23 +1723,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 [email protected] are

queue-4.15/serial-sh-sci-prevent-lockup-on-full-tty-buffers.patch queue-4.15/serial-8250_pci-add-brainboxes-uc-260-4-port-serial-device.patch queue-4.15/usb-usbmon-read-text-within-supplied-buffer-size.patch queue-4.15/asoc-rt5651-fix-regcache-sync-errors-on-resume.patch queue-4.15/usb-gadget-f_fs-fix-use-after-free-in-ffs_fs_kill_sb.patch queue-4.15/asoc-sgtl5000-fix-suspend-resume.patch queue-4.15/usb-storage-add-jmicron-bridge-152d-2567-to-unusual_devs.h.patch queue-4.15/usb-quirks-add-control-message-delay-for-1b1c-1b20.patch queue-4.15/scsi-sd_zbc-fix-potential-memory-leak.patch queue-4.15/xhci-fix-front-usb-ports-on-asus-prime-b350m-a.patch queue-4.15/dm-mpath-fix-passing-integrity-data.patch queue-4.15/usb-host-xhci-rcar-add-support-for-r8a77965.patch queue-4.15/earlycon-add-reg-offset-to-physical-address-before-mapping.patch queue-4.15/asoc-sun4i-i2s-fix-rx-slot-number-of-sun8i.patch queue-4.15/staging-comedi-fix-comedi_nsamples_left.patch queue-4.15/usbip-vudc-fix-null-pointer-dereference-on-udc-lock.patch queue-4.15/xhci-fix-endpoint-context-tracer-output.patch queue-4.15/x86-treat-r_x86_64_plt32-as-r_x86_64_pc32.patch queue-4.15/uas-fix-comparison-for-error-code.patch queue-4.15/asoc-wm_adsp-for-tlv-controls-only-register-tlv-get-set.patch queue-4.15/usb-dwc3-fix-lock-up-on-id-change-during-system-suspend-resume.patch queue-4.15/staging-android-ashmem-fix-lockdep-issue-during-llseek.patch queue-4.15/tty-serial-atmel-add-new-version-check-for-usart.patch queue-4.15/serial-core-mark-port-as-initialized-in-autoconfig.patch queue-4.15/revert-btrfs-use-proper-endianness-accessors-for.patch