Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -637,10 +637,6 @@ int btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
	faili = nr_pages - 1;
	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);

	/* include any pages we added in add_ra-bio_pages */
+11 −34
Original line number Diff line number Diff line
@@ -2897,12 +2897,11 @@ static int __do_readpage(struct extent_io_tree *tree,
	struct block_device *bdev;
	int ret;
	int nr = 0;
	int parent_locked = *bio_flags & EXTENT_BIO_PARENT_LOCKED;
	size_t pg_offset = 0;
	size_t iosize;
	size_t disk_io_size;
	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);

@@ -2942,7 +2941,6 @@ static int __do_readpage(struct extent_io_tree *tree,
			kunmap_atomic(userpage);
			set_extent_uptodate(tree, cur, cur + iosize - 1,
					    &cached, GFP_NOFS);
			if (!parent_locked)
			unlock_extent_cached(tree, cur,
					     cur + iosize - 1,
					     &cached, GFP_NOFS);
@@ -2952,7 +2950,6 @@ static int __do_readpage(struct extent_io_tree *tree,
				      end - cur + 1, get_extent, em_cached);
		if (IS_ERR_OR_NULL(em)) {
			SetPageError(page);
			if (!parent_locked)
			unlock_extent(tree, cur, end);
			break;
		}
@@ -3038,9 +3035,6 @@ static int __do_readpage(struct extent_io_tree *tree,

			set_extent_uptodate(tree, cur, cur + iosize - 1,
					    &cached, GFP_NOFS);
			if (parent_locked)
				free_extent_state(cached);
			else
			unlock_extent_cached(tree, cur,
					     cur + iosize - 1,
					     &cached, GFP_NOFS);
@@ -3052,7 +3046,6 @@ static int __do_readpage(struct extent_io_tree *tree,
		if (test_range_bit(tree, cur, cur_end,
				   EXTENT_UPTODATE, 1, NULL)) {
			check_page_uptodate(tree, page);
			if (!parent_locked)
			unlock_extent(tree, cur, cur + iosize - 1);
			cur = cur + iosize;
			pg_offset += iosize;
@@ -3063,7 +3056,6 @@ static int __do_readpage(struct extent_io_tree *tree,
		 */
		if (block_start == EXTENT_MAP_INLINE) {
			SetPageError(page);
			if (!parent_locked)
			unlock_extent(tree, cur, cur + iosize - 1);
			cur = cur + iosize;
			pg_offset += iosize;
@@ -3083,7 +3075,6 @@ static int __do_readpage(struct extent_io_tree *tree,
			*bio_flags = this_bio_flag;
		} else {
			SetPageError(page);
			if (!parent_locked)
			unlock_extent(tree, cur, cur + iosize - 1);
		}
		cur = cur + iosize;
@@ -3213,20 +3204,6 @@ int extent_read_full_page(struct extent_io_tree *tree, struct page *page,
	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,
				      struct writeback_control *wbc,
				      unsigned long nr_written)
+0 −3
Original line number Diff line number Diff line
@@ -29,7 +29,6 @@
 */
#define EXTENT_BIO_COMPRESSED 1
#define EXTENT_BIO_TREE_LOG 2
#define EXTENT_BIO_PARENT_LOCKED 4
#define EXTENT_BIO_FLAG_SHIFT 16

/* 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)
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,
			  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);
void extent_io_exit(void);