]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix page->private races
authorChris Mason <chris.mason@oracle.com>
Thu, 10 Feb 2011 17:35:00 +0000 (12:35 -0500)
committerChris Mason <chris.mason@oracle.com>
Mon, 14 Feb 2011 18:03:52 +0000 (13:03 -0500)
commit20992236417cd81265b284b9341fdf6206d8eead
tree1451cad453a3ff66bc5369dc83daf7e3a50c4897
parent441d8f85182b77abc84c52fca94e1dc14e17a9a9
Btrfs: fix page->private races

There is a race where btrfs_releasepage can drop the
page->private contents just as alloc_extent_buffer is setting
up pages for metadata.  Because of how the Btrfs page flags work,
this results in us skipping the crc on the page during IO.

This patch sovles the race by waiting until after the extent buffer
is inserted into the radix tree before it sets page private.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/disk-io.c
fs/btrfs/extent_io.c