Btrfs: Fix block generation verification race
authorYan, Zheng <zheng.yan@oracle.com>
Wed, 26 May 2010 15:20:30 +0000 (11:20 -0400)
committerChris Mason <chris.mason@oracle.com>
Thu, 27 May 2010 01:35:33 +0000 (21:35 -0400)
commit5bdd3536cbbe2ecd94ecc14410c6b1b31da16381
tree7fd9cd2cb497f6150a5dfde4528ba6ba64144e40
parent46bfbb5c0740c200d2b66afcbd1f9d64ab320940
Btrfs: Fix block generation verification race

After the path is released, the generation number got from block
pointer is no long valid. The race may cause disk corruption, because
verify_parent_transid() calls clear_extent_buffer_uptodate() when
generation numbers mismatch.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ctree.c