From: Greg Kroah-Hartman Date: Mon, 10 Nov 2014 05:46:19 +0000 (+0900) Subject: 3.14-stable patches X-Git-Tag: v3.10.60~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=48bb16b3ceade3767e9bf184dc0eadfd25dd3539;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: cpc925_edac-report-ue-events-properly.patch e7xxx_edac-report-ce-events-properly.patch ext3-don-t-check-quota-format-when-there-are-no-quota-files.patch i3200_edac-report-ce-events-properly.patch i82860_edac-report-ce-events-properly.patch nfsd4-fix-crash-on-unknown-operation-number.patch pci-rename-sysfs-enabled-file-back-to-enable.patch quota-properly-return-errors-from-dquot_writeback_dquots.patch revert-iwlwifi-mvm-treat-eapols-like-mgmt-frames-wrt-rate.patch xfs-avoid-false-quotacheck-after-unclean-shutdown.patch --- diff --git a/queue-3.14/cpc925_edac-report-ue-events-properly.patch b/queue-3.14/cpc925_edac-report-ue-events-properly.patch new file mode 100644 index 00000000000..4f76000edc4 --- /dev/null +++ b/queue-3.14/cpc925_edac-report-ue-events-properly.patch @@ -0,0 +1,31 @@ +From fa19ac4b92bc2b5024af3e868f41f81fa738567a Mon Sep 17 00:00:00 2001 +From: Jason Baron +Date: Wed, 15 Oct 2014 20:47:28 +0000 +Subject: cpc925_edac: Report UE events properly + +From: Jason Baron + +commit fa19ac4b92bc2b5024af3e868f41f81fa738567a upstream. + +Fix UE event being reported as HW_EVENT_ERR_CORRECTED. + +Signed-off-by: Jason Baron +Link: http://lkml.kernel.org/r/8beb13803500076fef827eab33d523e355d83759.1413405053.git.jbaron@akamai.com +Signed-off-by: Borislav Petkov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/edac/cpc925_edac.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/edac/cpc925_edac.c ++++ b/drivers/edac/cpc925_edac.c +@@ -562,7 +562,7 @@ static void cpc925_mc_check(struct mem_c + + if (apiexcp & UECC_EXCP_DETECTED) { + cpc925_mc_printk(mci, KERN_INFO, "DRAM UECC Fault\n"); +- edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, ++ edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, + pfn, offset, 0, + csrow, -1, -1, + mci->ctl_name, ""); diff --git a/queue-3.14/e7xxx_edac-report-ce-events-properly.patch b/queue-3.14/e7xxx_edac-report-ce-events-properly.patch new file mode 100644 index 00000000000..f3fbaa687d1 --- /dev/null +++ b/queue-3.14/e7xxx_edac-report-ce-events-properly.patch @@ -0,0 +1,31 @@ +From 8030122a9ccf939186f8db96c318dbb99b5463f6 Mon Sep 17 00:00:00 2001 +From: Jason Baron +Date: Sat, 18 Oct 2014 16:06:32 +0200 +Subject: e7xxx_edac: Report CE events properly + +From: Jason Baron + +commit 8030122a9ccf939186f8db96c318dbb99b5463f6 upstream. + +Fix CE event being reported as HW_EVENT_ERR_UNCORRECTED. + +Signed-off-by: Jason Baron +Link: http://lkml.kernel.org/r/e6dd616f2cd51583a7e77af6f639b86313c74144.1413405053.git.jbaron@akamai.com +Signed-off-by: Borislav Petkov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/edac/e7xxx_edac.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/edac/e7xxx_edac.c ++++ b/drivers/edac/e7xxx_edac.c +@@ -226,7 +226,7 @@ static void process_ce(struct mem_ctl_in + static void process_ce_no_info(struct mem_ctl_info *mci) + { + edac_dbg(3, "\n"); +- edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, 0, 0, 0, -1, -1, -1, ++ edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, 0, 0, 0, -1, -1, -1, + "e7xxx CE log register overflow", ""); + } + diff --git a/queue-3.14/ext3-don-t-check-quota-format-when-there-are-no-quota-files.patch b/queue-3.14/ext3-don-t-check-quota-format-when-there-are-no-quota-files.patch new file mode 100644 index 00000000000..c7597f44c04 --- /dev/null +++ b/queue-3.14/ext3-don-t-check-quota-format-when-there-are-no-quota-files.patch @@ -0,0 +1,37 @@ +From 7938db449bbc55bbeb164bec7af406212e7e98f1 Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Tue, 16 Sep 2014 22:23:10 +0200 +Subject: ext3: Don't check quota format when there are no quota files + +From: Jan Kara + +commit 7938db449bbc55bbeb164bec7af406212e7e98f1 upstream. + +The check whether quota format is set even though there are no +quota files with journalled quota is pointless and it actually +makes it impossible to turn off journalled quotas (as there's +no way to unset journalled quota format). Just remove the check. + +Signed-off-by: Jan Kara +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ext3/super.c | 7 ------- + 1 file changed, 7 deletions(-) + +--- a/fs/ext3/super.c ++++ b/fs/ext3/super.c +@@ -1354,13 +1354,6 @@ set_qf_format: + "not specified."); + return 0; + } +- } else { +- if (sbi->s_jquota_fmt) { +- ext3_msg(sb, KERN_ERR, "error: journaled quota format " +- "specified with no journaling " +- "enabled."); +- return 0; +- } + } + #endif + return 1; diff --git a/queue-3.14/i3200_edac-report-ce-events-properly.patch b/queue-3.14/i3200_edac-report-ce-events-properly.patch new file mode 100644 index 00000000000..d34a82dc760 --- /dev/null +++ b/queue-3.14/i3200_edac-report-ce-events-properly.patch @@ -0,0 +1,36 @@ +From 8a3f075d6c9b3612b4a5fb2af8db82b38b20caf0 Mon Sep 17 00:00:00 2001 +From: Jason Baron +Date: Wed, 15 Oct 2014 20:47:21 +0000 +Subject: i3200_edac: Report CE events properly + +From: Jason Baron + +commit 8a3f075d6c9b3612b4a5fb2af8db82b38b20caf0 upstream. + +Fix CE event being reported as HW_EVENT_ERR_UNCORRECTED. + +Signed-off-by: Jason Baron +Link: http://lkml.kernel.org/r/d02465b4f30314b390c12c061502eda5e9d29c52.1413405053.git.jbaron@akamai.com +Signed-off-by: Borislav Petkov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/edac/i3200_edac.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/edac/i3200_edac.c ++++ b/drivers/edac/i3200_edac.c +@@ -242,11 +242,11 @@ static void i3200_process_error_info(str + -1, -1, + "i3000 UE", ""); + } else if (log & I3200_ECCERRLOG_CE) { +- edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, ++ edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, + 0, 0, eccerrlog_syndrome(log), + eccerrlog_row(channel, log), + -1, -1, +- "i3000 UE", ""); ++ "i3000 CE", ""); + } + } + } diff --git a/queue-3.14/i82860_edac-report-ce-events-properly.patch b/queue-3.14/i82860_edac-report-ce-events-properly.patch new file mode 100644 index 00000000000..ba7ae7c8415 --- /dev/null +++ b/queue-3.14/i82860_edac-report-ce-events-properly.patch @@ -0,0 +1,31 @@ +From ab0543de6ff0877474f57a5aafbb51a61e88676f Mon Sep 17 00:00:00 2001 +From: Jason Baron +Date: Wed, 15 Oct 2014 20:47:24 +0000 +Subject: i82860_edac: Report CE events properly + +From: Jason Baron + +commit ab0543de6ff0877474f57a5aafbb51a61e88676f upstream. + +Fix CE event being reported as HW_EVENT_ERR_UNCORRECTED. + +Signed-off-by: Jason Baron +Link: http://lkml.kernel.org/r/7aee8e244a32ff86b399a8f966c4aae70296aae0.1413405053.git.jbaron@akamai.com +Signed-off-by: Borislav Petkov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/edac/i82860_edac.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/edac/i82860_edac.c ++++ b/drivers/edac/i82860_edac.c +@@ -124,7 +124,7 @@ static int i82860_process_error_info(str + dimm->location[0], dimm->location[1], -1, + "i82860 UE", ""); + else +- edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 1, ++ edac_mc_handle_error(HW_EVENT_ERR_CORRECTED, mci, 1, + info->eap, 0, info->derrsyn, + dimm->location[0], dimm->location[1], -1, + "i82860 CE", ""); diff --git a/queue-3.14/nfsd4-fix-crash-on-unknown-operation-number.patch b/queue-3.14/nfsd4-fix-crash-on-unknown-operation-number.patch new file mode 100644 index 00000000000..f59c1a8f2ab --- /dev/null +++ b/queue-3.14/nfsd4-fix-crash-on-unknown-operation-number.patch @@ -0,0 +1,34 @@ +From 51904b08072a8bf2b9ed74d1bd7a5300a614471d Mon Sep 17 00:00:00 2001 +From: "J. Bruce Fields" +Date: Wed, 22 Oct 2014 14:46:29 -0400 +Subject: nfsd4: fix crash on unknown operation number + +From: "J. Bruce Fields" + +commit 51904b08072a8bf2b9ed74d1bd7a5300a614471d upstream. + +Unknown operation numbers are caught in nfsd4_decode_compound() which +sets op->opnum to OP_ILLEGAL and op->status to nfserr_op_illegal. The +error causes the main loop in nfsd4_proc_compound() to skip most +processing. But nfsd4_proc_compound also peeks ahead at the next +operation in one case and doesn't take similar precautions there. + +Signed-off-by: J. Bruce Fields +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfsd/nfs4proc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/fs/nfsd/nfs4proc.c ++++ b/fs/nfsd/nfs4proc.c +@@ -1243,7 +1243,8 @@ static bool need_wrongsec_check(struct s + */ + if (argp->opcnt == resp->opcnt) + return false; +- ++ if (next->opnum == OP_ILLEGAL) ++ return false; + nextd = OPDESC(next); + /* + * Rest of 2.6.3.1.1: certain operations will return WRONGSEC diff --git a/queue-3.14/pci-rename-sysfs-enabled-file-back-to-enable.patch b/queue-3.14/pci-rename-sysfs-enabled-file-back-to-enable.patch new file mode 100644 index 00000000000..d800ffa4038 --- /dev/null +++ b/queue-3.14/pci-rename-sysfs-enabled-file-back-to-enable.patch @@ -0,0 +1,66 @@ +From d8e7d53a2fc14e0830ab728cb84ee19933d3ac8d Mon Sep 17 00:00:00 2001 +From: Greg Kroah-Hartman +Date: Thu, 30 Oct 2014 09:30:28 -0700 +Subject: PCI: Rename sysfs 'enabled' file back to 'enable' + +From: Greg Kroah-Hartman + +commit d8e7d53a2fc14e0830ab728cb84ee19933d3ac8d upstream. + +Back in commit 5136b2da770d ("PCI: convert bus code to use dev_groups"), +I misstyped the 'enable' sysfs filename as 'enabled', which broke the +userspace API. This patch fixes that issue by renaming the file back. + +Fixes: 5136b2da770d ("PCI: convert bus code to use dev_groups") +Reported-by: Jeff Epler +Tested-by: Jeff Epler # on v3.14-rt +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Bjorn Helgaas + +--- + drivers/pci/pci-sysfs.c | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +--- a/drivers/pci/pci-sysfs.c ++++ b/drivers/pci/pci-sysfs.c +@@ -186,9 +186,9 @@ static ssize_t modalias_show(struct devi + } + static DEVICE_ATTR_RO(modalias); + +-static ssize_t enabled_store(struct device *dev, +- struct device_attribute *attr, const char *buf, +- size_t count) ++static ssize_t enable_store(struct device *dev, ++ struct device_attribute *attr, const char *buf, ++ size_t count) + { + struct pci_dev *pdev = to_pci_dev(dev); + unsigned long val; +@@ -212,15 +212,15 @@ static ssize_t enabled_store(struct devi + return result < 0 ? result : count; + } + +-static ssize_t enabled_show(struct device *dev, +- struct device_attribute *attr, char *buf) ++static ssize_t enable_show(struct device *dev, ++ struct device_attribute *attr, char *buf) + { + struct pci_dev *pdev; + + pdev = to_pci_dev (dev); + return sprintf (buf, "%u\n", atomic_read(&pdev->enable_cnt)); + } +-static DEVICE_ATTR_RW(enabled); ++static DEVICE_ATTR_RW(enable); + + #ifdef CONFIG_NUMA + static ssize_t +@@ -526,7 +526,7 @@ static struct attribute *pci_dev_attrs[] + #endif + &dev_attr_dma_mask_bits.attr, + &dev_attr_consistent_dma_mask_bits.attr, +- &dev_attr_enabled.attr, ++ &dev_attr_enable.attr, + &dev_attr_broken_parity_status.attr, + &dev_attr_msi_bus.attr, + #if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_ACPI) diff --git a/queue-3.14/quota-properly-return-errors-from-dquot_writeback_dquots.patch b/queue-3.14/quota-properly-return-errors-from-dquot_writeback_dquots.patch new file mode 100644 index 00000000000..ad68db06e45 --- /dev/null +++ b/queue-3.14/quota-properly-return-errors-from-dquot_writeback_dquots.patch @@ -0,0 +1,33 @@ +From 474d2605d119479e5aa050f738632e63589d4bb5 Mon Sep 17 00:00:00 2001 +From: Jan Kara +Date: Wed, 22 Oct 2014 09:06:49 +0200 +Subject: quota: Properly return errors from dquot_writeback_dquots() + +From: Jan Kara + +commit 474d2605d119479e5aa050f738632e63589d4bb5 upstream. + +Due to a switched left and right side of an assignment, +dquot_writeback_dquots() never returned error. This could result in +errors during quota writeback to not be reported to userspace properly. +Fix it. + +Coverity-id: 1226884 +Signed-off-by: Jan Kara +Signed-off-by: Greg Kroah-Hartman + +--- + fs/quota/dquot.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/fs/quota/dquot.c ++++ b/fs/quota/dquot.c +@@ -637,7 +637,7 @@ int dquot_writeback_dquots(struct super_ + dqstats_inc(DQST_LOOKUPS); + err = sb->dq_op->write_dquot(dquot); + if (!ret && err) +- err = ret; ++ ret = err; + dqput(dquot); + spin_lock(&dq_list_lock); + } diff --git a/queue-3.14/revert-iwlwifi-mvm-treat-eapols-like-mgmt-frames-wrt-rate.patch b/queue-3.14/revert-iwlwifi-mvm-treat-eapols-like-mgmt-frames-wrt-rate.patch new file mode 100644 index 00000000000..ac67d34a155 --- /dev/null +++ b/queue-3.14/revert-iwlwifi-mvm-treat-eapols-like-mgmt-frames-wrt-rate.patch @@ -0,0 +1,75 @@ +From 1ffde699aae127e7abdb98dbdedc2cc6a973a1a1 Mon Sep 17 00:00:00 2001 +From: Emmanuel Grumbach +Date: Mon, 20 Oct 2014 08:29:55 +0300 +Subject: Revert "iwlwifi: mvm: treat EAPOLs like mgmt frames wrt rate" + +From: Emmanuel Grumbach + +commit 1ffde699aae127e7abdb98dbdedc2cc6a973a1a1 upstream. + +This reverts commit aa11bbf3df026d6b1c6b528bef634fd9de7c2619. +This commit was causing connection issues and is not needed +if IWL_MVM_RS_RSSI_BASED_INIT_RATE is set to false by default. + +Regardless of the issues mentioned above, this patch added the +following WARNING: + +WARNING: CPU: 0 PID: 3946 at drivers/net/wireless/iwlwifi/mvm/tx.c:190 iwl_mvm_set_tx_params+0x60a/0x6f0 [iwlmvm]() +Got an HT rate for a non data frame 0x8 +CPU: 0 PID: 3946 Comm: wpa_supplicant Tainted: G O 3.17.0+ #6 +Hardware name: LENOVO 20ANCTO1WW/20ANCTO1WW, BIOS GLET71WW (2.25 ) 07/02/2014 + 0000000000000009 ffffffff814fa911 ffff8804288db8f8 ffffffff81064f52 + 0000000000001808 ffff8804288db948 ffff88040add8660 ffff8804291b5600 + 0000000000000000 ffffffff81064fb7 ffffffffa07b73d0 0000000000000020 +Call Trace: + [] ? dump_stack+0x41/0x51 + [] ? warn_slowpath_common+0x72/0x90 + [] ? warn_slowpath_fmt+0x47/0x50 + [] ? iwl_mvm_set_tx_params+0x60a/0x6f0 [iwlmvm] + [] ? iwl_mvm_tx_skb+0x48/0x3c0 [iwlmvm] + [] ? iwl_mvm_mac_tx+0x7b/0x180 [iwlmvm] + [] ? __ieee80211_tx+0x2b9/0x3c0 [mac80211] + [] ? ieee80211_tx+0xb3/0x100 [mac80211] + [] ? ieee80211_subif_start_xmit+0x459/0xca0 [mac80211] + [] ? dev_hard_start_xmit+0x337/0x5f0 + [] ? sch_direct_xmit+0x96/0x1f0 + [] ? __dev_queue_xmit+0x203/0x4f0 + [] ? ether_setup+0x70/0x70 + [] ? packet_sendmsg+0xf81/0x1110 + [] ? skb_free_datagram+0xc/0x40 + [] ? sock_sendmsg+0x88/0xc0 + [] ? move_addr_to_kernel.part.20+0x14/0x60 + [] ? __inode_wait_for_writeback+0x62/0xb0 + [] ? SYSC_sendto+0xf1/0x180 + [] ? __sys_recvmsg+0x39/0x70 + [] ? system_call_fastpath+0x1a/0x1f +---[ end trace cc19a150d311fc63 ]--- + +which was reported here: https://bugzilla.kernel.org/show_bug.cgi?id=85691 + +Signed-off-by: Emmanuel Grumbach +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/iwlwifi/mvm/tx.c | 8 ++------ + 1 file changed, 2 insertions(+), 6 deletions(-) + +--- a/drivers/net/wireless/iwlwifi/mvm/tx.c ++++ b/drivers/net/wireless/iwlwifi/mvm/tx.c +@@ -173,14 +173,10 @@ static void iwl_mvm_set_tx_cmd_rate(stru + + /* + * for data packets, rate info comes from the table inside the fw. This +- * table is controlled by LINK_QUALITY commands. Exclude ctrl port +- * frames like EAPOLs which should be treated as mgmt frames. This +- * avoids them being sent initially in high rates which increases the +- * chances for completion of the 4-Way handshake. ++ * table is controlled by LINK_QUALITY commands + */ + +- if (ieee80211_is_data(fc) && sta && +- !(info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO)) { ++ if (ieee80211_is_data(fc) && sta) { + tx_cmd->initial_rate_index = 0; + tx_cmd->tx_flags |= cpu_to_le32(TX_CMD_FLG_STA_RATE); + return; diff --git a/queue-3.14/series b/queue-3.14/series index d08e4292ba5..aad80474e6c 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -167,3 +167,13 @@ cgroup-kmemleak-add-kmemleak_free-for-cgroup-deallocations.patch mm-memcontrol-do-not-iterate-uninitialized-memcgs.patch lib-bitmap.c-fix-undefined-shift-in-__bitmap_shift_-left-right.patch scsi-fix-error-handling-in-scsi_ioctl_send_command.patch +i82860_edac-report-ce-events-properly.patch +i3200_edac-report-ce-events-properly.patch +e7xxx_edac-report-ce-events-properly.patch +cpc925_edac-report-ue-events-properly.patch +nfsd4-fix-crash-on-unknown-operation-number.patch +revert-iwlwifi-mvm-treat-eapols-like-mgmt-frames-wrt-rate.patch +ext3-don-t-check-quota-format-when-there-are-no-quota-files.patch +pci-rename-sysfs-enabled-file-back-to-enable.patch +quota-properly-return-errors-from-dquot_writeback_dquots.patch +xfs-avoid-false-quotacheck-after-unclean-shutdown.patch diff --git a/queue-3.14/xfs-avoid-false-quotacheck-after-unclean-shutdown.patch b/queue-3.14/xfs-avoid-false-quotacheck-after-unclean-shutdown.patch new file mode 100644 index 00000000000..da6a6830af7 --- /dev/null +++ b/queue-3.14/xfs-avoid-false-quotacheck-after-unclean-shutdown.patch @@ -0,0 +1,98 @@ +From 5ef828c4152726f56751c78ea844f08d2b2a4fa3 Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Mon, 4 Aug 2014 11:35:44 +1000 +Subject: xfs: avoid false quotacheck after unclean shutdown + +From: Eric Sandeen + +commit 5ef828c4152726f56751c78ea844f08d2b2a4fa3 upstream. + +The commit + +83e782e xfs: Remove incore use of XFS_OQUOTA_ENFD and XFS_OQUOTA_CHKD + +added a new function xfs_sb_quota_from_disk() which swaps +on-disk XFS_OQUOTA_* flags for in-core XFS_GQUOTA_* and XFS_PQUOTA_* +flags after the superblock is read. + +However, if log recovery is required, the superblock is read again, +and the modified in-core flags are re-read from disk, so we have +XFS_OQUOTA_* flags in memory again. This causes the +XFS_QM_NEED_QUOTACHECK() test to be true, because the XFS_OQUOTA_CHKD +is still set, and not XFS_GQUOTA_CHKD or XFS_PQUOTA_CHKD. + +Change xfs_sb_from_disk to call xfs_sb_quota_from disk and always +convert the disk flags to in-memory flags. + +Add a lower-level function which can be called with "false" to +not convert the flags, so that the sb verifier can verify +exactly what was on disk, per Brian Foster's suggestion. + +Reported-by: Cyril B. +Signed-off-by: Eric Sandeen +Cc: Arkadiusz Miśkiewicz +Signed-off-by: Greg Kroah-Hartman + +--- + fs/xfs/xfs_mount.c | 1 - + fs/xfs/xfs_sb.c | 24 ++++++++++++++++++++---- + 2 files changed, 20 insertions(+), 5 deletions(-) + +--- a/fs/xfs/xfs_mount.c ++++ b/fs/xfs/xfs_mount.c +@@ -321,7 +321,6 @@ reread: + * Initialize the mount structure from the superblock. + */ + xfs_sb_from_disk(sbp, XFS_BUF_TO_SBP(bp)); +- xfs_sb_quota_from_disk(sbp); + + /* + * If we haven't validated the superblock, do so now before we try +--- a/fs/xfs/xfs_sb.c ++++ b/fs/xfs/xfs_sb.c +@@ -397,10 +397,11 @@ xfs_sb_quota_from_disk(struct xfs_sb *sb + } + } + +-void +-xfs_sb_from_disk( ++static void ++__xfs_sb_from_disk( + struct xfs_sb *to, +- xfs_dsb_t *from) ++ xfs_dsb_t *from, ++ bool convert_xquota) + { + to->sb_magicnum = be32_to_cpu(from->sb_magicnum); + to->sb_blocksize = be32_to_cpu(from->sb_blocksize); +@@ -456,6 +457,17 @@ xfs_sb_from_disk( + to->sb_pad = 0; + to->sb_pquotino = be64_to_cpu(from->sb_pquotino); + to->sb_lsn = be64_to_cpu(from->sb_lsn); ++ /* Convert on-disk flags to in-memory flags? */ ++ if (convert_xquota) ++ xfs_sb_quota_from_disk(to); ++} ++ ++void ++xfs_sb_from_disk( ++ struct xfs_sb *to, ++ xfs_dsb_t *from) ++{ ++ __xfs_sb_from_disk(to, from, true); + } + + static inline void +@@ -571,7 +583,11 @@ xfs_sb_verify( + struct xfs_mount *mp = bp->b_target->bt_mount; + struct xfs_sb sb; + +- xfs_sb_from_disk(&sb, XFS_BUF_TO_SBP(bp)); ++ /* ++ * Use call variant which doesn't convert quota flags from disk ++ * format, because xfs_mount_validate_sb checks the on-disk flags. ++ */ ++ __xfs_sb_from_disk(&sb, XFS_BUF_TO_SBP(bp), false); + + /* + * Only check the in progress field for the primary superblock as