Now that we do not do partial filling of tickets simply remove orig_bytes, it is no longer needed.
Signed-off-by: Josef Bacik <jo...@toxicpanda.com> Reviewed-by: Nikolay Borisov <nbori...@suse.com> --- fs/btrfs/space-info.c | 8 -------- fs/btrfs/space-info.h | 1 - 2 files changed, 9 deletions(-) diff --git a/fs/btrfs/space-info.c b/fs/btrfs/space-info.c index cec6db0c41cc..c5939c24c963 100644 --- a/fs/btrfs/space-info.c +++ b/fs/btrfs/space-info.c @@ -905,7 +905,6 @@ static int handle_reserve_ticket(struct btrfs_fs_info *fs_info, struct reserve_ticket *ticket, enum btrfs_reserve_flush_enum flush) { - u64 reclaim_bytes = 0; int ret; switch (flush) { @@ -930,17 +929,11 @@ static int handle_reserve_ticket(struct btrfs_fs_info *fs_info, spin_lock(&space_info->lock); ret = ticket->error; if (ticket->bytes || ticket->error) { - if (ticket->bytes < ticket->orig_bytes) - reclaim_bytes = ticket->orig_bytes - ticket->bytes; list_del_init(&ticket->list); if (!ret) ret = -ENOSPC; } spin_unlock(&space_info->lock); - - if (reclaim_bytes) - btrfs_space_info_add_old_bytes(fs_info, space_info, - reclaim_bytes); ASSERT(list_empty(&ticket->list)); return ret; } @@ -1000,7 +993,6 @@ static int __reserve_metadata_bytes(struct btrfs_fs_info *fs_info, * the list and we will do our own flushing further down. */ if (ret && flush != BTRFS_RESERVE_NO_FLUSH) { - ticket.orig_bytes = orig_bytes; ticket.bytes = orig_bytes; ticket.error = 0; init_waitqueue_head(&ticket.wait); diff --git a/fs/btrfs/space-info.h b/fs/btrfs/space-info.h index 0e805b5b1fca..d61550f06c94 100644 --- a/fs/btrfs/space-info.h +++ b/fs/btrfs/space-info.h @@ -70,7 +70,6 @@ struct btrfs_space_info { }; struct reserve_ticket { - u64 orig_bytes; u64 bytes; int error; struct list_head list; -- 2.21.0