]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: qgroup: Avoid calling btrfs_free_reserved_data_space in clear_bit_hook
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Thu, 8 Oct 2015 10:19:37 +0000 (18:19 +0800)
committerChris Mason <clm@fb.com>
Thu, 22 Oct 2015 01:41:09 +0000 (18:41 -0700)
commit83b7ba0c398cc686d211f51e5162c7ed4cd976cb
tree3d2c52d2424e01df54e3ac6bd060028d293235b1
parent133a335226f275821889673b8b00fbd3a9b33703
btrfs: qgroup: Avoid calling btrfs_free_reserved_data_space in clear_bit_hook

In clear_bit_hook, qgroup reserved data is already handled quite well,
either released by finish_ordered_io or invalidatepage.

So calling btrfs_qgroup_free_data() here is completely meaningless, and
since btrfs_qgroup_free_data() will lock io_tree, so it can't be called
with io_tree lock hold.

This patch will add a new function
btrfs_free_reserved_data_space_noquota() for clear_bit_hook() to cease
the lockdep warning.

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/inode.c