mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 05:10:51 +07:00
Btrfs: Fix verify_parent_transid
It was incorrectly clearing the up to date flag on the buffer even when the buffer properly verified. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
parent
f321e49103
commit
33958dc6d3
@ -235,8 +235,8 @@ static int verify_parent_transid(struct extent_io_tree *io_tree,
|
|||||||
(unsigned long long)parent_transid,
|
(unsigned long long)parent_transid,
|
||||||
(unsigned long long)btrfs_header_generation(eb));
|
(unsigned long long)btrfs_header_generation(eb));
|
||||||
ret = 1;
|
ret = 1;
|
||||||
out:
|
|
||||||
clear_extent_buffer_uptodate(io_tree, eb);
|
clear_extent_buffer_uptodate(io_tree, eb);
|
||||||
|
out:
|
||||||
unlock_extent(io_tree, eb->start, eb->start + eb->len - 1,
|
unlock_extent(io_tree, eb->start, eb->start + eb->len - 1,
|
||||||
GFP_NOFS);
|
GFP_NOFS);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -2647,6 +2647,8 @@ static inline struct page *extent_buffer_page(struct extent_buffer *eb,
|
|||||||
return eb->first_page;
|
return eb->first_page;
|
||||||
i += eb->start >> PAGE_CACHE_SHIFT;
|
i += eb->start >> PAGE_CACHE_SHIFT;
|
||||||
mapping = eb->first_page->mapping;
|
mapping = eb->first_page->mapping;
|
||||||
|
if (!mapping)
|
||||||
|
return NULL;
|
||||||
read_lock_irq(&mapping->tree_lock);
|
read_lock_irq(&mapping->tree_lock);
|
||||||
p = radix_tree_lookup(&mapping->page_tree, i);
|
p = radix_tree_lookup(&mapping->page_tree, i);
|
||||||
read_unlock_irq(&mapping->tree_lock);
|
read_unlock_irq(&mapping->tree_lock);
|
||||||
@ -2908,7 +2910,8 @@ int clear_extent_buffer_uptodate(struct extent_io_tree *tree,
|
|||||||
GFP_NOFS);
|
GFP_NOFS);
|
||||||
for (i = 0; i < num_pages; i++) {
|
for (i = 0; i < num_pages; i++) {
|
||||||
page = extent_buffer_page(eb, i);
|
page = extent_buffer_page(eb, i);
|
||||||
ClearPageUptodate(page);
|
if (page)
|
||||||
|
ClearPageUptodate(page);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user