]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
btrfs: return void from readahead_tree_block
authorDavid Sterba <dsterba@suse.cz>
Sat, 14 Jun 2014 22:49:36 +0000 (00:49 +0200)
committerDavid Sterba <dsterba@suse.cz>
Thu, 2 Oct 2014 14:30:40 +0000 (16:30 +0200)
Errors in readahead are not fatal and ignored elsewhere in the code.

Signed-off-by: David Sterba <dsterba@suse.cz>
fs/btrfs/disk-io.c
fs/btrfs/disk-io.h
fs/btrfs/extent-tree.c

index ff83748d39dab66695d314765411321bc34a133f..332f63518156ceadd1d7aa36b754fab4b55a4f30 100644 (file)
@@ -1062,19 +1062,17 @@ static const struct address_space_operations btree_aops = {
        .set_page_dirty = btree_set_page_dirty,
 };
 
-int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize)
+void readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize)
 {
        struct extent_buffer *buf = NULL;
        struct inode *btree_inode = root->fs_info->btree_inode;
-       int ret = 0;
 
        buf = btrfs_find_create_tree_block(root, bytenr, blocksize);
        if (!buf)
-               return 0;
+               return;
        read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree,
                                 buf, 0, WAIT_NONE, btree_get_extent, 0);
        free_extent_buffer(buf);
-       return ret;
 }
 
 int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr, u32 blocksize,
index 8cd6a53db621a4c4d4b4a721676478f74b2b8768..0d9793f6b594d364b6e6361f073ff8adc743a164 100644 (file)
@@ -46,7 +46,7 @@ struct btrfs_fs_devices;
 
 struct extent_buffer *read_tree_block(struct btrfs_root *root, u64 bytenr,
                                      u32 blocksize, u64 parent_transid);
-int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize);
+void readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize);
 int reada_tree_block_flagged(struct btrfs_root *root, u64 bytenr, u32 blocksize,
                         int mirror_num, struct extent_buffer **eb);
 struct extent_buffer *btrfs_find_create_tree_block(struct btrfs_root *root,
index 058abd088f0fbde7d39ce1e3614a7f7d5bc12b9b..e0468a9789a5ab5c7cd43cd8be3b9deb932404fa 100644 (file)
@@ -7486,9 +7486,7 @@ static noinline void reada_walk_down(struct btrfs_trans_handle *trans,
                                continue;
                }
 reada:
-               ret = readahead_tree_block(root, bytenr, blocksize);
-               if (ret)
-                       break;
+               readahead_tree_block(root, bytenr, blocksize);
                nread++;
        }
        wc->reada_slot = slot;