Bug ID 1025065
Summary Btrfs: fix warning of bytes_may_use
Classification openSUSE
Product openSUSE Distribution
Version Leap 42.1
Hardware Other
OS Other
Status NEW
Severity Normal
Priority P5 - None
Component Kernel
Assignee jeffm@suse.com
Reporter jeffm@suse.com
QA Contact qa-bugs@suse.de
Found By ---
Blocker ---

From: Liu Bo <bo.li.liu@oracle.com>
Date: Wed, 17 Jun 2015 16:59:58 +0800
Subject: Btrfs: fix warning of bytes_may_use
Git-commit: ddba1bfc2369cd0566bcfdab47599834a32d1c19
Patch-mainline: v4.2-rc2
References: revisit

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>
Acked-by: Jeff Mahoney <jeffm@suse.com>
---
 fs/btrfs/btrfs_inode.h |  2 ++
 fs/btrfs/inode.c       | 16 +++++++++++++---
 2 files changed, 15 insertions(+), 3 deletions(-)


You are receiving this mail because: