Skip to content

Commit 9f6cbcb

Browse files
committed
btrfs: open code btrfs_after_dev_replace_commit
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>
1 parent e37abe9 commit 9f6cbcb

3 files changed

Lines changed: 4 additions & 10 deletions

File tree

‎fs/btrfs/dev-replace.c‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -382,14 +382,6 @@ int btrfs_run_dev_replace(struct btrfs_trans_handle *trans,
382382
return ret;
383383
}
384384

385-
void btrfs_after_dev_replace_commit(struct btrfs_fs_info *fs_info)
386-
{
387-
struct btrfs_dev_replace *dev_replace = &fs_info->dev_replace;
388-
389-
dev_replace->committed_cursor_left =
390-
dev_replace->cursor_left_last_write_of_item;
391-
}
392-
393385
static char* btrfs_dev_name(struct btrfs_device *device)
394386
{
395387
if (!device || test_bit(BTRFS_DEV_STATE_MISSING, &device->dev_state))

‎fs/btrfs/dev-replace.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ struct btrfs_ioctl_dev_replace_args;
1111
int btrfs_init_dev_replace(struct btrfs_fs_info *fs_info);
1212
int btrfs_run_dev_replace(struct btrfs_trans_handle *trans,
1313
struct btrfs_fs_info *fs_info);
14-
void btrfs_after_dev_replace_commit(struct btrfs_fs_info *fs_info);
1514
int btrfs_dev_replace_by_ioctl(struct btrfs_fs_info *fs_info,
1615
struct btrfs_ioctl_dev_replace_args *args);
1716
int btrfs_dev_replace_start(struct btrfs_fs_info *fs_info,

‎fs/btrfs/transaction.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,10 @@ static noinline int commit_cowonly_roots(struct btrfs_trans_handle *trans)
11981198

11991199
list_add_tail(&fs_info->extent_root->dirty_list,
12001200
&trans->transaction->switch_commits);
1201-
btrfs_after_dev_replace_commit(fs_info);
1201+
1202+
/* Update dev-replace pointer once everything is committed */
1203+
fs_info->dev_replace.committed_cursor_left =
1204+
fs_info->dev_replace.cursor_left_last_write_of_item;
12021205

12031206
return 0;
12041207
}

0 commit comments

Comments
 (0)