]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: make uncache_state unconditional
authorChris Mason <chris.mason@oracle.com>
Tue, 12 Apr 2011 17:57:39 +0000 (13:57 -0400)
committerChris Mason <chris.mason@oracle.com>
Wed, 13 Apr 2011 00:51:26 +0000 (20:51 -0400)
commit4a103bab27f78667094aedf2dcd2a9717b9ab464
tree2f9211a615e24452d88040741d93f04714cfef34
parent6434e1faf296f3926b26c7da09362ab03ea6003e
Btrfs: make uncache_state unconditional

The extent_io code can take cached pointers into the extent state trees,
and these can make lookups much faster in common operations.  The
caching only happens when specific bits are set that prevent merging
and splitting of the extent state.

A help function was added to uncache the state, and it was testing
the same set of conditionals.  This can leak in very strange corner
cases where the lock bit goes away unexpectedly.

The uncaching should be unconditional.  Once we have a ref on the
extent we should always give it up.

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