summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.h
diff options
context:
space:
mode:
authorJosef Bacik <josef@redhat.com>2012-03-09 09:51:43 -0500
committerChris Mason <chris.mason@oracle.com>2012-03-26 16:51:08 -0400
commit115391d2315239164e400a8259b26392afccf3bd (patch)
tree83f6bd7698b5bfddbe3be57d6411a120eced2399 /fs/btrfs/extent_io.h
parent4f2de97acee6532b36dd6e995b858343771ad126 (diff)
downloadop-kernel-dev-115391d2315239164e400a8259b26392afccf3bd.zip
op-kernel-dev-115391d2315239164e400a8259b26392afccf3bd.tar.gz
Btrfs: only use the existing eb if it's count isn't 0
We can run into a problem where we find an eb for our existing page already on the radix tree but it has a ref count of 0. It hasn't yet been removed by RCU yet so this can cause issues where we will use the EB after free. So do atomic_inc_not_zero on the exists->refs and if it is zero just do synchronize_rcu() and try again. We won't have to worry about new allocators coming in since they will block on the page lock at this point. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com>
Diffstat (limited to 'fs/btrfs/extent_io.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud