• Qu Wenruo's avatar
    btrfs: Fix a data space underflow warning · 485290a7
    Qu Wenruo authored
    Even with quota disabled, generic/127 will trigger a kernel warning by
    underflow data space info.
    
    The bug is caused by buffered write, which in case of short copy, the
    start parameter for btrfs_delalloc_release_space() is wrong, and
    round_up/down() in btrfs_delalloc_release() extents the range to page
    aligned, decreasing one more page than expected.
    
    This patch will fix it by passing correct start.
    Signed-off-by: default avatarQu Wenruo <quwenruo@cn.fujitsu.com>
    Signed-off-by: default avatarChris Mason <clm@fb.com>
    485290a7
file.c 78.4 KB