Commit 7f042a83 authored by Filipe Manana's avatar Filipe Manana

Btrfs: remove no longer used function extent_read_full_page_nolock()

Not needed after the previous patch named
"Btrfs: fix page reading in extent_same ioctl leading to csum errors".
Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
parent 31314002
...@@ -637,10 +637,6 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, ...@@ -637,10 +637,6 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
faili = nr_pages - 1; faili = nr_pages - 1;
cb->nr_pages = nr_pages; cb->nr_pages = nr_pages;
/* In the parent-locked case, we only locked the range we are
* interested in. In all other cases, we can opportunistically
* cache decompressed data that goes beyond the requested range. */
if (!(bio_flags & EXTENT_BIO_PARENT_LOCKED))
add_ra_bio_pages(inode, em_start + em_len, cb); add_ra_bio_pages(inode, em_start + em_len, cb);
/* include any pages we added in add_ra-bio_pages */ /* include any pages we added in add_ra-bio_pages */
......
...@@ -2897,12 +2897,11 @@ static int __do_readpage(struct extent_io_tree *tree, ...@@ -2897,12 +2897,11 @@ static int __do_readpage(struct extent_io_tree *tree,
struct block_device *bdev; struct block_device *bdev;
int ret; int ret;
int nr = 0; int nr = 0;
int parent_locked = *bio_flags & EXTENT_BIO_PARENT_LOCKED;
size_t pg_offset = 0; size_t pg_offset = 0;
size_t iosize; size_t iosize;
size_t disk_io_size; size_t disk_io_size;
size_t blocksize = inode->i_sb->s_blocksize; size_t blocksize = inode->i_sb->s_blocksize;
unsigned long this_bio_flag = *bio_flags & EXTENT_BIO_PARENT_LOCKED; unsigned long this_bio_flag = 0;
set_page_extent_mapped(page); set_page_extent_mapped(page);
...@@ -2942,7 +2941,6 @@ static int __do_readpage(struct extent_io_tree *tree, ...@@ -2942,7 +2941,6 @@ static int __do_readpage(struct extent_io_tree *tree,
kunmap_atomic(userpage); kunmap_atomic(userpage);
set_extent_uptodate(tree, cur, cur + iosize - 1, set_extent_uptodate(tree, cur, cur + iosize - 1,
&cached, GFP_NOFS); &cached, GFP_NOFS);
if (!parent_locked)
unlock_extent_cached(tree, cur, unlock_extent_cached(tree, cur,
cur + iosize - 1, cur + iosize - 1,
&cached, GFP_NOFS); &cached, GFP_NOFS);
...@@ -2952,7 +2950,6 @@ static int __do_readpage(struct extent_io_tree *tree, ...@@ -2952,7 +2950,6 @@ static int __do_readpage(struct extent_io_tree *tree,
end - cur + 1, get_extent, em_cached); end - cur + 1, get_extent, em_cached);
if (IS_ERR_OR_NULL(em)) { if (IS_ERR_OR_NULL(em)) {
SetPageError(page); SetPageError(page);
if (!parent_locked)
unlock_extent(tree, cur, end); unlock_extent(tree, cur, end);
break; break;
} }
...@@ -3038,9 +3035,6 @@ static int __do_readpage(struct extent_io_tree *tree, ...@@ -3038,9 +3035,6 @@ static int __do_readpage(struct extent_io_tree *tree,
set_extent_uptodate(tree, cur, cur + iosize - 1, set_extent_uptodate(tree, cur, cur + iosize - 1,
&cached, GFP_NOFS); &cached, GFP_NOFS);
if (parent_locked)
free_extent_state(cached);
else
unlock_extent_cached(tree, cur, unlock_extent_cached(tree, cur,
cur + iosize - 1, cur + iosize - 1,
&cached, GFP_NOFS); &cached, GFP_NOFS);
...@@ -3052,7 +3046,6 @@ static int __do_readpage(struct extent_io_tree *tree, ...@@ -3052,7 +3046,6 @@ static int __do_readpage(struct extent_io_tree *tree,
if (test_range_bit(tree, cur, cur_end, if (test_range_bit(tree, cur, cur_end,
EXTENT_UPTODATE, 1, NULL)) { EXTENT_UPTODATE, 1, NULL)) {
check_page_uptodate(tree, page); check_page_uptodate(tree, page);
if (!parent_locked)
unlock_extent(tree, cur, cur + iosize - 1); unlock_extent(tree, cur, cur + iosize - 1);
cur = cur + iosize; cur = cur + iosize;
pg_offset += iosize; pg_offset += iosize;
...@@ -3063,7 +3056,6 @@ static int __do_readpage(struct extent_io_tree *tree, ...@@ -3063,7 +3056,6 @@ static int __do_readpage(struct extent_io_tree *tree,
*/ */
if (block_start == EXTENT_MAP_INLINE) { if (block_start == EXTENT_MAP_INLINE) {
SetPageError(page); SetPageError(page);
if (!parent_locked)
unlock_extent(tree, cur, cur + iosize - 1); unlock_extent(tree, cur, cur + iosize - 1);
cur = cur + iosize; cur = cur + iosize;
pg_offset += iosize; pg_offset += iosize;
...@@ -3083,7 +3075,6 @@ static int __do_readpage(struct extent_io_tree *tree, ...@@ -3083,7 +3075,6 @@ static int __do_readpage(struct extent_io_tree *tree,
*bio_flags = this_bio_flag; *bio_flags = this_bio_flag;
} else { } else {
SetPageError(page); SetPageError(page);
if (!parent_locked)
unlock_extent(tree, cur, cur + iosize - 1); unlock_extent(tree, cur, cur + iosize - 1);
} }
cur = cur + iosize; cur = cur + iosize;
...@@ -3213,20 +3204,6 @@ int extent_read_full_page(struct extent_io_tree *tree, struct page *page, ...@@ -3213,20 +3204,6 @@ int extent_read_full_page(struct extent_io_tree *tree, struct page *page,
return ret; return ret;
} }
int extent_read_full_page_nolock(struct extent_io_tree *tree, struct page *page,
get_extent_t *get_extent, int mirror_num)
{
struct bio *bio = NULL;
unsigned long bio_flags = EXTENT_BIO_PARENT_LOCKED;
int ret;
ret = __do_readpage(tree, page, get_extent, NULL, &bio, mirror_num,
&bio_flags, READ, NULL);
if (bio)
ret = submit_one_bio(READ, bio, mirror_num, bio_flags);
return ret;
}
static noinline void update_nr_written(struct page *page, static noinline void update_nr_written(struct page *page,
struct writeback_control *wbc, struct writeback_control *wbc,
unsigned long nr_written) unsigned long nr_written)
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
*/ */
#define EXTENT_BIO_COMPRESSED 1 #define EXTENT_BIO_COMPRESSED 1
#define EXTENT_BIO_TREE_LOG 2 #define EXTENT_BIO_TREE_LOG 2
#define EXTENT_BIO_PARENT_LOCKED 4
#define EXTENT_BIO_FLAG_SHIFT 16 #define EXTENT_BIO_FLAG_SHIFT 16
/* these are bit numbers for test/set bit */ /* these are bit numbers for test/set bit */
...@@ -210,8 +209,6 @@ static inline int lock_extent(struct extent_io_tree *tree, u64 start, u64 end) ...@@ -210,8 +209,6 @@ static inline int lock_extent(struct extent_io_tree *tree, u64 start, u64 end)
int try_lock_extent(struct extent_io_tree *tree, u64 start, u64 end); int try_lock_extent(struct extent_io_tree *tree, u64 start, u64 end);
int extent_read_full_page(struct extent_io_tree *tree, struct page *page, int extent_read_full_page(struct extent_io_tree *tree, struct page *page,
get_extent_t *get_extent, int mirror_num); get_extent_t *get_extent, int mirror_num);
int extent_read_full_page_nolock(struct extent_io_tree *tree, struct page *page,
get_extent_t *get_extent, int mirror_num);
int __init extent_io_init(void); int __init extent_io_init(void);
void extent_io_exit(void); void extent_io_exit(void);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment