Skip to content

Commit def936e

Browse files
josefbacikkdave
authored andcommitted
btrfs: remove orig_bytes from reserve_ticket
Now that we do not do partial filling of tickets simply remove orig_bytes, it is no longer needed. Reviewed-by: Nikolay Borisov <[email protected]> Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 00c0135 commit def936e

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

fs/btrfs/space-info.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,6 @@ static int handle_reserve_ticket(struct btrfs_fs_info *fs_info,
920920
struct reserve_ticket *ticket,
921921
enum btrfs_reserve_flush_enum flush)
922922
{
923-
u64 reclaim_bytes = 0;
924923
int ret;
925924

926925
switch (flush) {
@@ -945,17 +944,11 @@ static int handle_reserve_ticket(struct btrfs_fs_info *fs_info,
945944
spin_lock(&space_info->lock);
946945
ret = ticket->error;
947946
if (ticket->bytes || ticket->error) {
948-
if (ticket->bytes < ticket->orig_bytes)
949-
reclaim_bytes = ticket->orig_bytes - ticket->bytes;
950947
list_del_init(&ticket->list);
951948
if (!ret)
952949
ret = -ENOSPC;
953950
}
954951
spin_unlock(&space_info->lock);
955-
956-
if (reclaim_bytes)
957-
btrfs_space_info_add_old_bytes(fs_info, space_info,
958-
reclaim_bytes);
959952
ASSERT(list_empty(&ticket->list));
960953
return ret;
961954
}
@@ -1015,7 +1008,6 @@ static int __reserve_metadata_bytes(struct btrfs_fs_info *fs_info,
10151008
* the list and we will do our own flushing further down.
10161009
*/
10171010
if (ret && flush != BTRFS_RESERVE_NO_FLUSH) {
1018-
ticket.orig_bytes = orig_bytes;
10191011
ticket.bytes = orig_bytes;
10201012
ticket.error = 0;
10211013
init_waitqueue_head(&ticket.wait);

fs/btrfs/space-info.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ struct btrfs_space_info {
7070
};
7171

7272
struct reserve_ticket {
73-
u64 orig_bytes;
7473
u64 bytes;
7574
int error;
7675
struct list_head list;

0 commit comments

Comments
 (0)