• Chris Mason's avatar
    Btrfs: Don't try to compress pages past i_size · f03d9301
    Chris Mason authored
    The compression code had some checks to make sure we were only
    compressing bytes inside of i_size, but it wasn't catching every
    case.  To make things worse, some incorrect math about the number
    of bytes remaining would make it try to compress more pages than the
    file really had.
    
    The fix used here is to fall back to the non-compression code in this
    case, which does all the proper cleanup of delalloc and other accounting.
    Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
    f03d9301
inode.c 135 KB