btrfs: get fs_info from eb in btrfs_exclude_logged_extents
authorDavid Sterba <dsterba@suse.com>
Wed, 20 Mar 2019 11:14:33 +0000 (12:14 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:30 +0000 (19:02 +0200)
We can read fs_info from extent buffer and can drop it from the
parameters.

Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/tree-log.c

index 7fabe4fd080059d7ceebda213498befe111e40bb..1ec08bb1c2e08a9386cb34190f69fbfa02806576 100644 (file)
@@ -2708,8 +2708,7 @@ int btrfs_pin_extent(struct btrfs_fs_info *fs_info,
                     u64 bytenr, u64 num, int reserved);
 int btrfs_pin_extent_for_log_replay(struct btrfs_fs_info *fs_info,
                                    u64 bytenr, u64 num_bytes);
                     u64 bytenr, u64 num, int reserved);
 int btrfs_pin_extent_for_log_replay(struct btrfs_fs_info *fs_info,
                                    u64 bytenr, u64 num_bytes);
-int btrfs_exclude_logged_extents(struct btrfs_fs_info *fs_info,
-                                struct extent_buffer *eb);
+int btrfs_exclude_logged_extents(struct extent_buffer *eb);
 int btrfs_cross_ref_exist(struct btrfs_root *root,
                          u64 objectid, u64 offset, u64 bytenr);
 struct btrfs_block_group_cache *btrfs_lookup_block_group(
 int btrfs_cross_ref_exist(struct btrfs_root *root,
                          u64 objectid, u64 offset, u64 bytenr);
 struct btrfs_block_group_cache *btrfs_lookup_block_group(
index b0c86a817a99c32554c02e54ef23aea4144dccb8..44fd4553004b13e6c73057db4af7a49042d34743 100644 (file)
@@ -6601,9 +6601,9 @@ out_lock:
        return ret;
 }
 
        return ret;
 }
 
-int btrfs_exclude_logged_extents(struct btrfs_fs_info *fs_info,
-                                struct extent_buffer *eb)
+int btrfs_exclude_logged_extents(struct extent_buffer *eb)
 {
 {
+       struct btrfs_fs_info *fs_info = eb->fs_info;
        struct btrfs_file_extent_item *item;
        struct btrfs_key key;
        int found_type;
        struct btrfs_file_extent_item *item;
        struct btrfs_key key;
        int found_type;
index a59e98c9fbb92a4911fe7d608eea857546dee9f5..4cb61cb72c4ed58c6b76762b38a79e5343796741 100644 (file)
@@ -315,7 +315,7 @@ static int process_one_buffer(struct btrfs_root *log,
 
        if (!ret && btrfs_buffer_uptodate(eb, gen, 0)) {
                if (wc->pin && btrfs_header_level(eb) == 0)
 
        if (!ret && btrfs_buffer_uptodate(eb, gen, 0)) {
                if (wc->pin && btrfs_header_level(eb) == 0)
-                       ret = btrfs_exclude_logged_extents(fs_info, eb);
+                       ret = btrfs_exclude_logged_extents(eb);
                if (wc->write)
                        btrfs_write_tree_block(eb);
                if (wc->wait)
                if (wc->write)
                        btrfs_write_tree_block(eb);
                if (wc->wait)