]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix oops on page->mapping->host during writepage
authorChris Mason <chris.mason@oracle.com>
Mon, 20 Apr 2009 19:50:09 +0000 (15:50 -0400)
committerChris Mason <chris.mason@oracle.com>
Mon, 20 Apr 2009 19:53:09 +0000 (15:53 -0400)
commitfcbc4e4b7d8a09c5cda1f70ede868129ec4210e1
treebaeaabbe0a10d903ba3e0d6ff90ae9934912fc21
parentd35b1cee5f77411c3b2f8c3aebb9471514e3ac60
Btrfs: fix oops on page->mapping->host during writepage

The extent_io writepage call updates the writepage index in the inode
as it makes progress.  But, it was doing the update after unlocking the page,
which isn't legal because page->mapping can't be trusted once the page
is unlocked.

This lead to an oops, especially common with compression turned on.  The
fix here is to update the writeback index before unlocking the page.

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