btrfs: remove no longer used btrfs_transaction_in_commit()
authorFilipe Manana <fdmanana@suse.com>
Tue, 13 Feb 2024 15:23:35 +0000 (15:23 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 4 Mar 2024 15:24:52 +0000 (16:24 +0100)
The function btrfs_transaction_in_commit() is no longer used, its last
use was removed in commit 11aeb97b45ad ("btrfs: don't arbitrarily slow
down delalloc if we're committing"), so just remove it.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/transaction.c
fs/btrfs/transaction.h

index cdc4bfb409281a7a91feb26e104f4363d41f1571..22ca59e299485208d3307eef1ad0c6222e47e200 100644 (file)
@@ -1957,19 +1957,6 @@ static void update_super_roots(struct btrfs_fs_info *fs_info)
                super->uuid_tree_generation = root_item->generation;
 }
 
-int btrfs_transaction_in_commit(struct btrfs_fs_info *info)
-{
-       struct btrfs_transaction *trans;
-       int ret = 0;
-
-       spin_lock(&info->trans_lock);
-       trans = info->running_transaction;
-       if (trans)
-               ret = (trans->state >= TRANS_STATE_COMMIT_START);
-       spin_unlock(&info->trans_lock);
-       return ret;
-}
-
 int btrfs_transaction_blocked(struct btrfs_fs_info *info)
 {
        struct btrfs_transaction *trans;
index 681109c5f441faaf7648ce29789a6b2f6e4a08b3..4e451ab173b1072857461fdbea36883a7a2a8526 100644 (file)
@@ -277,7 +277,6 @@ int btrfs_write_marked_extents(struct btrfs_fs_info *fs_info,
                                struct extent_io_tree *dirty_pages, int mark);
 int btrfs_wait_tree_log_extents(struct btrfs_root *root, int mark);
 int btrfs_transaction_blocked(struct btrfs_fs_info *info);
-int btrfs_transaction_in_commit(struct btrfs_fs_info *info);
 void btrfs_put_transaction(struct btrfs_transaction *transaction);
 void btrfs_add_dropped_root(struct btrfs_trans_handle *trans,
                            struct btrfs_root *root);