]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix wrong reservation of csums
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 28 Mar 2013 08:08:20 +0000 (08:08 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Thu, 28 Mar 2013 13:51:30 +0000 (09:51 -0400)
commit078c81d693b1d4b94f4d4c83a1ce73327b953a16
tree9de238dbe4fbe627d4b8914561827cf6b3d9c19e
parentacd6c27b3a4ebd21e10787c1c0faa01b813a7bbf
Btrfs: fix wrong reservation of csums

We reserve the space for csums only when we write data into a file, in
the other cases, such as tree log, log replay, we don't do reservation,
so we can use the reservation of the transaction handle just for the former.
And for the latter, we should use the tree's own reservation. But the
function - btrfs_csum_file_blocks() didn't differentiate between these
two types of the cases, fix it.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/file-item.c
fs/btrfs/inode.c