Commit 08d2f347e877e489ca098c87a6fd2e872fef9767
Committed by
Chris Mason
1 parent
0e735872fb
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
fs/btrfs/inode.c
... | ... | @@ -1986,7 +1986,7 @@ |
1986 | 1986 | } |
1987 | 1987 | |
1988 | 1988 | if (BTRFS_I(inode)->flags & BTRFS_INODE_NODATASUM) |
1989 | - return 0; | |
1989 | + goto good; | |
1990 | 1990 | |
1991 | 1991 | if (root->root_key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID && |
1992 | 1992 | test_range_bit(io_tree, start, end, EXTENT_NODATASUM, 1, NULL)) { |