• Josef Bacik's avatar
    Btrfs: fix race when getting the eb out of page->private · b5bae261
    Josef Bacik authored
    We can race when checking wether PagePrivate is set on a page and we
    actually have an eb saved in the pages private pointer.  We could have
    easily written out this page and released it in the time that we did the
    pagevec lookup and actually got around to looking at this page.  So use
    mapping->private_lock to ensure we get a consistent view of the
    page->private pointer.  This is inline with the alloc and releasepage paths
    which use private_lock when manipulating page->private.  Thanks,
    Reported-by: default avatarDavid Sterba <dave@jikos.cz>
    Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
    b5bae261
extent_io.c 123 KB