summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/locking.h
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@fusionio.com>2012-07-20 16:11:08 -0400
committerChris Mason <chris.mason@fusionio.com>2012-07-23 16:28:09 -0400
commit594831c4b232b094d645503ecedec2e35dcebdf3 (patch)
tree27867ddba8f36d9dc4946c5beee2f18d7be8c861 /fs/btrfs/locking.h
parente64860aa05048fa7a8483ca698b17c2caf5625cf (diff)
downloadblackbird-op-linux-594831c4b232b094d645503ecedec2e35dcebdf3.tar.gz
blackbird-op-linux-594831c4b232b094d645503ecedec2e35dcebdf3.zip
Btrfs: fix potential race in extent buffer freeing
This sounds sort of impossible but it is the only thing I can think of and at the very least it is theoretically possible so here it goes. If we are in try_release_extent_buffer we will check that the ref count on the extent buffer is 1 and not under IO, and then go down and clear the tree ref. If between this check and clearing the tree ref somebody else comes in and grabs a ref on the eb and the marks it dirty before try_release_extent_buffer() does it's tree ref clear we can end up with a dirty eb that will be freed while it is still dirty which will result in a panic. Thanks, Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/btrfs/locking.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud