diff options
-rw-r--r-- | fs/btrfs/disk-io.c | 2 | ||||
-rw-r--r-- | fs/btrfs/extent_io.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 27ffa9b7ddc8..ec1ba8ddb35f 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -235,8 +235,8 @@ static int verify_parent_transid(struct extent_io_tree *io_tree, | |||
235 | (unsigned long long)parent_transid, | 235 | (unsigned long long)parent_transid, |
236 | (unsigned long long)btrfs_header_generation(eb)); | 236 | (unsigned long long)btrfs_header_generation(eb)); |
237 | ret = 1; | 237 | ret = 1; |
238 | out: | ||
239 | clear_extent_buffer_uptodate(io_tree, eb); | 238 | clear_extent_buffer_uptodate(io_tree, eb); |
239 | out: | ||
240 | unlock_extent(io_tree, eb->start, eb->start + eb->len - 1, | 240 | unlock_extent(io_tree, eb->start, eb->start + eb->len - 1, |
241 | GFP_NOFS); | 241 | GFP_NOFS); |
242 | return ret; | 242 | return ret; |
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index e3547a992d5c..964ec1622d66 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -2647,6 +2647,8 @@ static inline struct page *extent_buffer_page(struct extent_buffer *eb, | |||
2647 | return eb->first_page; | 2647 | return eb->first_page; |
2648 | i += eb->start >> PAGE_CACHE_SHIFT; | 2648 | i += eb->start >> PAGE_CACHE_SHIFT; |
2649 | mapping = eb->first_page->mapping; | 2649 | mapping = eb->first_page->mapping; |
2650 | if (!mapping) | ||
2651 | return NULL; | ||
2650 | read_lock_irq(&mapping->tree_lock); | 2652 | read_lock_irq(&mapping->tree_lock); |
2651 | p = radix_tree_lookup(&mapping->page_tree, i); | 2653 | p = radix_tree_lookup(&mapping->page_tree, i); |
2652 | read_unlock_irq(&mapping->tree_lock); | 2654 | read_unlock_irq(&mapping->tree_lock); |
@@ -2908,7 +2910,8 @@ int clear_extent_buffer_uptodate(struct extent_io_tree *tree, | |||
2908 | GFP_NOFS); | 2910 | GFP_NOFS); |
2909 | for (i = 0; i < num_pages; i++) { | 2911 | for (i = 0; i < num_pages; i++) { |
2910 | page = extent_buffer_page(eb, i); | 2912 | page = extent_buffer_page(eb, i); |
2911 | ClearPageUptodate(page); | 2913 | if (page) |
2914 | ClearPageUptodate(page); | ||
2912 | } | 2915 | } |
2913 | return 0; | 2916 | return 0; |
2914 | } | 2917 | } |