Commit 92e2f7e3 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove btrfs_fs_info::open_ioctl_trans

Since userspace transaction have been removed we no longer have use
for this field so delete it.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent bcf3a3e7
......@@ -880,7 +880,6 @@ struct btrfs_fs_info {
struct rb_root tree_mod_log;
atomic_t async_delalloc_pages;
atomic_t open_ioctl_trans;
/*
* this is used to protect the following list -- ordered_roots.
......
......@@ -4338,8 +4338,7 @@ int btrfs_alloc_data_chunk_ondemand(struct btrfs_inode *inode, u64 bytes)
/* commit the current transaction and try again */
commit_trans:
if (need_commit &&
!atomic_read(&fs_info->open_ioctl_trans)) {
if (need_commit) {
need_commit--;
if (need_commit > 0) {
......
......@@ -443,8 +443,7 @@ static int may_wait_transaction(struct btrfs_fs_info *fs_info, int type)
if (test_bit(BTRFS_FS_LOG_RECOVERING, &fs_info->flags))
return 0;
if (type == TRANS_START &&
!atomic_read(&fs_info->open_ioctl_trans))
if (type == TRANS_START)
return 1;
return 0;
......@@ -766,7 +765,6 @@ int btrfs_wait_for_commit(struct btrfs_fs_info *fs_info, u64 transid)
void btrfs_throttle(struct btrfs_fs_info *fs_info)
{
if (!atomic_read(&fs_info->open_ioctl_trans))
wait_current_trans(fs_info);
}
......@@ -870,8 +868,7 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans,
btrfs_trans_release_chunk_metadata(trans);
if (lock && !atomic_read(&info->open_ioctl_trans) &&
should_end_transaction(trans) &&
if (lock && should_end_transaction(trans) &&
READ_ONCE(cur_trans->state) == TRANS_STATE_RUNNING) {
spin_lock(&info->trans_lock);
if (cur_trans->state == TRANS_STATE_RUNNING)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment