btrfs: open code btrfs_after_dev_replace_commit
authorDavid Sterba <dsterba@suse.com>
Fri, 24 Aug 2018 15:41:17 +0000 (17:41 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 15 Oct 2018 15:23:37 +0000 (17:23 +0200)
Too trivial, the purpose can be simply documented in a comment.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/dev-replace.c
fs/btrfs/dev-replace.h
fs/btrfs/transaction.c

index a79e8d67f76814bf6ddbbfd65b6acfdcac718baa..264105a26e7ede0a6eefb8e4d73c182e1a5d6b24 100644 (file)
@@ -382,14 +382,6 @@ out:
        return ret;
 }
 
-void btrfs_after_dev_replace_commit(struct btrfs_fs_info *fs_info)
-{
-       struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace;
-
-       dev_replace->committed_cursor_left =
-               dev_replace->cursor_left_last_write_of_item;
-}
-
 static char* btrfs_dev_name(struct btrfs_device *device)
 {
        if (!device || test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state))
index 1c91bf9ef39aea819645f24dcfe936a2bf686534..795c551f5b5eb3226d25c2692b4756ee67108e68 100644 (file)
@@ -11,7 +11,6 @@ struct btrfs_ioctl_dev_replace_args;
 int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info);
 int btrfs_run_dev_replace(struct btrfs_trans_handle *trans,
                          struct btrfs_fs_info *fs_info);
-void btrfs_after_dev_replace_commit(struct btrfs_fs_info *fs_info);
 int btrfs_dev_replace_by_ioctl(struct btrfs_fs_info *fs_info,
                            struct btrfs_ioctl_dev_replace_args *args);
 int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info,
index 3b1cc978d409d19c6caeda873d40123ad872435f..cadc747292d9f4b833c8d332a1be16b8256bef9c 100644 (file)
@@ -1198,7 +1198,10 @@ again:
 
        list_add_tail(&fs_info->extent_root->dirty_list,
                      &trans->transaction->switch_commits);
-       btrfs_after_dev_replace_commit(fs_info);
+
+       /* Update dev-replace pointer once everything is committed */
+       fs_info->dev_replace.committed_cursor_left =
+               fs_info->dev_replace.cursor_left_last_write_of_item;
 
        return 0;
 }