btrfs: Remove btrfs_fs_info::open_ioctl_trans
authorNikolay Borisov <nborisov@suse.com>
Mon, 5 Feb 2018 08:41:16 +0000 (10:41 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 30 Mar 2018 23:26:51 +0000 (01:26 +0200)
Since userspace transaction have been removed we no longer have use
for this field so delete it.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/transaction.c

index 395bfc51e256cfc2acebfe815dc9e8e9faf53e6f..50c068fd3b386c2177c50dcef2f0ccea644991f6 100644 (file)
@@ -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.
index 2760292e1175920f6a469b64447a4a71f3b77269..1469117a8e37175e59338e5f049a02d691594398 100644 (file)
@@ -4338,8 +4338,7 @@ again:
 
                /* 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) {
index 34efc9773719a1ca53dfff7d0d2270259702480e..f4b1225a3bec3e6a2caef10e42acefdf6aee73b4 100644 (file)
@@ -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,8 +765,7 @@ out:
 
 void btrfs_throttle(struct btrfs_fs_info *fs_info)
 {
-       if (!atomic_read(&fs_info->open_ioctl_trans))
-               wait_current_trans(fs_info);
+       wait_current_trans(fs_info);
 }
 
 static int should_end_transaction(struct btrfs_trans_handle *trans)
@@ -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)