]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 15 Jul 2016 21:45:23 +0000 (14:45 -0700)
commite10db08da9299935abe15c84bc121301056894dd
tree2fda594990026653d55de38663f466a7e85e0091
parentd17e724b395f17024e16740406b59fef23a718c5
Btrfs: fix warning of bytes_may_use

Orabug: 23717870

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>
(cherry picked from commit ddba1bfc2369cd0566bcfdab47599834a32d1c19)
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
fs/btrfs/btrfs_inode.h
fs/btrfs/inode.c