]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Fix a data space underflow warning
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Thu, 29 Oct 2015 09:28:46 +0000 (17:28 +0800)
committerChris Mason <clm@fb.com>
Tue, 3 Nov 2015 15:44:20 +0000 (07:44 -0800)
commitb81eca92e8b8536088705514e51a748a704c8159
treee9c10f2e1fcbb2e86ee66d1af947a8c6b8b7abe0
parent4f24728e2cd56e007bcfce48645312c075e06fe1
btrfs: Fix a data space underflow warning

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: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/file.c