aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2011-06-20 14:53:48 -0400
committerJosef Bacik <josef@redhat.com>2011-07-11 10:00:48 -0400
commitdf98b6e2c52f65665eaf0fc23e647fb64335b289 (patch)
tree0f7e235f8f51d87928266129392e630524847be5 /fs/btrfs/ctree.h
parent2f356126c589d562f98e2287f9c7b983388dc62f (diff)
Btrfs: fix how we merge extent states and deal with cached states
First, we can sometimes free the state we're merging, which means anybody who calls merge_state() may have the state it passed in free'ed. This is problematic because we could end up caching the state, which makes caching useless as the state will no longer be part of the tree. So instead of free'ing the state we passed into merge_state(), set it's end to the other->end and free the other state. This way we are sure to cache the correct state. Also because we can merge states together, instead of only using the cache'd state if it's start == the start we are looking for, go ahead and use it if the start we are looking for is within the range of the cached state. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
0 files changed, 0 insertions, 0 deletions