]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix warning of bytes_may_use
authorLiu Bo <bo.li.liu@oracle.com>
Wed, 17 Jun 2015 08:59:58 +0000 (16:59 +0800)
committerChris Mason <clm@fb.com>
Thu, 2 Jul 2015 00:17:21 +0000 (17:17 -0700)
commit2331cf88a6022b2123a74383e2a3a970a37905d9
tree81924f0b14728137202db0732582cfa5f05d6703
parentcccd3bdbe2cf081b0d7db39407ae886f3e246665
Btrfs: fix warning of bytes_may_use

While running generic/019, dmesg got several warnings from
btrfs_free_reserved_data_space().

Test generic/019 produces some disk failures so sumbit dio will get errors,
in which case, btrfs_direct_IO() goes to the error handling and free
bytes_may_use, but the problem is that bytes_may_use has been free'd
during get_block().

This adds a runtime flag to show if we've gone through get_block(), if so,
don't do the cleanup work.

Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Tested-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/inode.c