diff options
author | Jan Schmidt <list.btrfs@jan-o-sch.net> | 2011-05-04 16:18:50 +0200 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-06-10 19:00:53 -0400 |
commit | 08d2f347e877e489ca098c87a6fd2e872fef9767 (patch) | |
tree | 1bbe77e283afcc22afa1510fbf42aa27529cbadd | |
parent | 0e735872fb4b157a2fc94d4443f367e9aeb533a6 (diff) | |
download | talos-op-linux-08d2f347e877e489ca098c87a6fd2e872fef9767.tar.gz talos-op-linux-08d2f347e877e489ca098c87a6fd2e872fef9767.zip |
Btrfs: fix extent state leak on failed nodatasum reads
When encountering an EIO while reading from a nodatasum extent, we
insert an error record into the inode's failure tree.
btrfs_readpage_end_io_hook returns early for nodatasum inodes. We'd
better clear the failure tree in that case, otherwise the kernel
complains about
BUG extent_state: Objects remaining on kmem_cache_close()
on rmmod.
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 02ff4a1b968b..113913ae36e0 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1986,7 +1986,7 @@ static int btrfs_readpage_end_io_hook(struct page *page, u64 start, u64 end, } if (BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM) - return 0; + goto good; if (root->root_key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID && test_range_bit(io_tree, start, end, EXTENT_NODATASUM, 1, NULL)) { |