]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fix condition of commit transaction
authorZhao Lei <zhaolei@cn.fujitsu.com>
Sat, 14 Feb 2015 05:23:45 +0000 (13:23 +0800)
committerChris Mason <clm@fb.com>
Mon, 13 Apr 2015 14:26:40 +0000 (07:26 -0700)
commit42e609052ff39f5aac7c98e59490f9d8cf3847e1
tree802839c6379786086b980f44a6ed852bcbcb8e86
parent6201dca77a14448386c6a9e16240c8f8abc8e636
btrfs: fix condition of commit transaction

Old code bypass commit transaction when we don't have enough
pinned space, but another case is there exist freed bgs in current
transction, it have possibility to make alloc_chunk success.

This patch modify the condition to:
if (have_free_bg || have_pinned_space) commit_transaction()

Confirmed above action by printk before and after patch.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/extent-tree.c