]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: fix big-endian bugs which could cause fs corruptions
authorZheng Liu <wenqing.lz@taobao.com>
Wed, 3 Apr 2013 16:27:18 +0000 (12:27 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 3 Apr 2013 16:37:17 +0000 (12:37 -0400)
commitb81a7d22a20fef2715fe28ff5fe73d9070818ad4
treefa381ca0422657142d69a8a8528cefe1e57de973
parent6063df806efc7a67ce2311a1e96d03d920fc264c
ext4: fix big-endian bugs which could cause fs corruptions

When an extent was zeroed out, we forgot to do convert from cpu to le16.
It could make us hit a BUG_ON when we try to write dirty pages out.  So
fix it.

[ Also fix a bug found by Dmitry Monakhov where we were missing
  le32_to_cpu() calls in the new indirect punch hole code.

  There are a number of other big endian warnings found by static code
  analyzers, but we'll wait for the next merge window to fix them all
  up.  These fixes are designed to be Obviously Correct by code
  inspection, and easy to demonstrate that it won't make any
  difference (and hence, won't introduce any bugs) on little endian
  architectures such as x86.  --tytso ]

Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reported-by: CAI Qian <caiqian@redhat.com>
Reported-by: Christian Kujau <lists@nerdbynature.de>
Cc: Dmitry Monakhov <dmonakhov@openvz.org>
fs/ext4/extents.c
fs/ext4/indirect.c