]> git.baikalelectronics.ru Git - kernel.git/commit
ext4: use proper csum calculation in ext4_rename
authorTao Ma <boyu.mt@taobao.com>
Mon, 9 Jul 2012 20:29:05 +0000 (16:29 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 9 Jul 2012 20:29:05 +0000 (16:29 -0400)
commited38535b81af059934e903d2990e8a93df16a01a
treed70873af34e22a92988308a04ec1d5818bff8100
parent0bc14d5638f24ff73d92415ebe6d1efb0f8310c8
ext4: use proper csum calculation in ext4_rename

In ext4_rename, when the old name is a dir, we need to
change ".." to its new parent and journal the change, so
with metadata_csum enabled, we have to re-calc the csum.

As the first block of the dir can be either a htree root
or a normal directory block and we have different csum
calculation for these 2 types, we have to choose the right
one in ext4_rename.

btw, it is found by xfstests 013.

Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Acked-by: Darrick J. Wong <djwong@us.ibm.com>
fs/ext4/namei.c