• Josef Bacik's avatar
    btrfs: check for BTRFS_FS_ERROR in pending ordered assert · 4ca8e03c
    Josef Bacik authored
    If we do fast tree logging we increment a counter on the current
    transaction for every ordered extent we need to wait for.  This means we
    expect the transaction to still be there when we clear pending on the
    ordered extent.  However if we happen to abort the transaction and clean
    it up, there could be no running transaction, and thus we'll trip the
    "ASSERT(trans)" check.  This is obviously incorrect, and the code
    properly deals with the case that the transaction doesn't exist.  Fix
    this ASSERT() to only fire if there's no trans and we don't have
    BTRFS_FS_ERROR() set on the file system.
    
    CC: stable@vger.kernel.org # 4.14+
    Reviewed-by: default avatarFilipe Manana <fdmanana@suse.com>
    Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    4ca8e03c
ordered-data.c 35.1 KB