]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix wrong free space information
authorMiao Xie <miaox@cn.fujitsu.com>
Fri, 5 Aug 2011 09:32:35 +0000 (09:32 +0000)
committerChris Mason <chris.mason@oracle.com>
Wed, 17 Aug 2011 01:09:31 +0000 (21:09 -0400)
commit35dc4ca98a616f62a2130c9f6f2bc56f3f79539c
treeae5cb912cdc3a36a0aa7d43a554658821e0a6161
parent4a43f5913bbd97b5eafcea500c00f3af5129a84a
Btrfs: fix wrong free space information

Btrfs subtracted the size of the allocated space twice when it allocated
the space from the bitmap in the cluster, it broke the free space information
and led to oops finally.

And this patch also fixes the bug that ctl->free_space was subtracted
without lock.

Reported-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/free-space-cache.c