• Josef Bacik's avatar
    Btrfs: fix small race with delalloc flushing waitqueue's · b5cb1600
    Josef Bacik authored
    Everytime we start a new flushing thread, we init the waitqueue if there isn't a
    flushing thread running.  The problem with this is we check
    space_info->flushing, which we clear right before doing a wake_up on the
    flushing waitqueue, which causes problems if we init the waitqueue in the middle
    of clearing the flushing flagh and calling wake_up.  This is hard to hit, but
    the code is wrong anyway, so init the flushing/allocating waitqueue when
    creating the space info and let it be.  I haven't seen the panic since I've been
    using this patch.  Thanks,
    Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    b5cb1600
extent-tree.c 201 KB