Skip to content

Commit

Permalink
Merge tag 'xfs-fixes-for-linus-4.5' of git://git.kernel.org/pub/scm/l…
Browse files Browse the repository at this point in the history
…inux/kernel/git/dgc/linux-xfs

Pull xfs fix from Dve Chinner:
 "This contains a fix for an endian conversion issue in new CRC
  validation in log recovery that was discovered on a ppc64 platform"

* tag 'xfs-fixes-for-linus-4.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs:
  xfs: fix endianness error when checking log block crc on big endian platforms
  • Loading branch information
torvalds committed Feb 12, 2016
2 parents c05235d + 8e0bd49 commit dfc8528
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/xfs/xfs_log_recover.c
Original file line number Diff line number Diff line change
Expand Up @@ -4491,7 +4491,7 @@ xlog_recover_process(
* know precisely what failed.
*/
if (pass == XLOG_RECOVER_CRCPASS) {
if (rhead->h_crc && crc != le32_to_cpu(rhead->h_crc))
if (rhead->h_crc && crc != rhead->h_crc)
return -EFSBADCRC;
return 0;
}
Expand All @@ -4502,7 +4502,7 @@ xlog_recover_process(
* zero CRC check prevents warnings from being emitted when upgrading
* the kernel from one that does not add CRCs by default.
*/
if (crc != le32_to_cpu(rhead->h_crc)) {
if (crc != rhead->h_crc) {
if (rhead->h_crc || xfs_sb_version_hascrc(&log->l_mp->m_sb)) {
xfs_alert(log->l_mp,
"log record CRC mismatch: found 0x%x, expected 0x%x.",
Expand Down

0 comments on commit dfc8528

Please sign in to comment.