Commit bcf3a3e7 authored by Nikolay Borisov's avatar Nikolay Borisov Committed by David Sterba

btrfs: Remove code referencing unused TRANS_USERSPACE

Now that the userspace transaction ioctls have been removed,
TRANS_USERSPACE is no longer used hence we can remove it.
Signed-off-by: default avatarNikolay Borisov <nborisov@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 859e682d
...@@ -37,22 +37,16 @@ ...@@ -37,22 +37,16 @@
static const unsigned int btrfs_blocked_trans_types[TRANS_STATE_MAX] = { static const unsigned int btrfs_blocked_trans_types[TRANS_STATE_MAX] = {
[TRANS_STATE_RUNNING] = 0U, [TRANS_STATE_RUNNING] = 0U,
[TRANS_STATE_BLOCKED] = (__TRANS_USERSPACE | [TRANS_STATE_BLOCKED] = __TRANS_START,
__TRANS_START), [TRANS_STATE_COMMIT_START] = (__TRANS_START | __TRANS_ATTACH),
[TRANS_STATE_COMMIT_START] = (__TRANS_USERSPACE | [TRANS_STATE_COMMIT_DOING] = (__TRANS_START |
__TRANS_START |
__TRANS_ATTACH),
[TRANS_STATE_COMMIT_DOING] = (__TRANS_USERSPACE |
__TRANS_START |
__TRANS_ATTACH | __TRANS_ATTACH |
__TRANS_JOIN), __TRANS_JOIN),
[TRANS_STATE_UNBLOCKED] = (__TRANS_USERSPACE | [TRANS_STATE_UNBLOCKED] = (__TRANS_START |
__TRANS_START |
__TRANS_ATTACH | __TRANS_ATTACH |
__TRANS_JOIN | __TRANS_JOIN |
__TRANS_JOIN_NOLOCK), __TRANS_JOIN_NOLOCK),
[TRANS_STATE_COMPLETED] = (__TRANS_USERSPACE | [TRANS_STATE_COMPLETED] = (__TRANS_START |
__TRANS_START |
__TRANS_ATTACH | __TRANS_ATTACH |
__TRANS_JOIN | __TRANS_JOIN |
__TRANS_JOIN_NOLOCK), __TRANS_JOIN_NOLOCK),
...@@ -449,9 +443,6 @@ static int may_wait_transaction(struct btrfs_fs_info *fs_info, int type) ...@@ -449,9 +443,6 @@ static int may_wait_transaction(struct btrfs_fs_info *fs_info, int type)
if (test_bit(BTRFS_FS_LOG_RECOVERING, &fs_info->flags)) if (test_bit(BTRFS_FS_LOG_RECOVERING, &fs_info->flags))
return 0; return 0;
if (type == TRANS_USERSPACE)
return 1;
if (type == TRANS_START && if (type == TRANS_START &&
!atomic_read(&fs_info->open_ioctl_trans)) !atomic_read(&fs_info->open_ioctl_trans))
return 1; return 1;
...@@ -593,7 +584,7 @@ start_transaction(struct btrfs_root *root, unsigned int num_items, ...@@ -593,7 +584,7 @@ start_transaction(struct btrfs_root *root, unsigned int num_items,
got_it: got_it:
btrfs_record_root_in_trans(h, root); btrfs_record_root_in_trans(h, root);
if (!current->journal_info && type != TRANS_USERSPACE) if (!current->journal_info)
current->journal_info = h; current->journal_info = h;
return h; return h;
...@@ -670,12 +661,6 @@ struct btrfs_trans_handle *btrfs_join_transaction_nolock(struct btrfs_root *root ...@@ -670,12 +661,6 @@ struct btrfs_trans_handle *btrfs_join_transaction_nolock(struct btrfs_root *root
BTRFS_RESERVE_NO_FLUSH, true); BTRFS_RESERVE_NO_FLUSH, true);
} }
struct btrfs_trans_handle *btrfs_start_ioctl_transaction(struct btrfs_root *root)
{
return start_transaction(root, 0, TRANS_USERSPACE,
BTRFS_RESERVE_NO_FLUSH, true);
}
/* /*
* btrfs_attach_transaction() - catch the running transaction * btrfs_attach_transaction() - catch the running transaction
* *
......
...@@ -105,21 +105,18 @@ struct btrfs_transaction { ...@@ -105,21 +105,18 @@ struct btrfs_transaction {
#define __TRANS_FREEZABLE (1U << 0) #define __TRANS_FREEZABLE (1U << 0)
#define __TRANS_USERSPACE (1U << 8)
#define __TRANS_START (1U << 9) #define __TRANS_START (1U << 9)
#define __TRANS_ATTACH (1U << 10) #define __TRANS_ATTACH (1U << 10)
#define __TRANS_JOIN (1U << 11) #define __TRANS_JOIN (1U << 11)
#define __TRANS_JOIN_NOLOCK (1U << 12) #define __TRANS_JOIN_NOLOCK (1U << 12)
#define __TRANS_DUMMY (1U << 13) #define __TRANS_DUMMY (1U << 13)
#define TRANS_USERSPACE (__TRANS_USERSPACE | __TRANS_FREEZABLE)
#define TRANS_START (__TRANS_START | __TRANS_FREEZABLE) #define TRANS_START (__TRANS_START | __TRANS_FREEZABLE)
#define TRANS_ATTACH (__TRANS_ATTACH) #define TRANS_ATTACH (__TRANS_ATTACH)
#define TRANS_JOIN (__TRANS_JOIN | __TRANS_FREEZABLE) #define TRANS_JOIN (__TRANS_JOIN | __TRANS_FREEZABLE)
#define TRANS_JOIN_NOLOCK (__TRANS_JOIN_NOLOCK) #define TRANS_JOIN_NOLOCK (__TRANS_JOIN_NOLOCK)
#define TRANS_EXTWRITERS (__TRANS_USERSPACE | __TRANS_START | \ #define TRANS_EXTWRITERS (__TRANS_START | __TRANS_ATTACH)
__TRANS_ATTACH)
#define BTRFS_SEND_TRANS_STUB ((void *)1) #define BTRFS_SEND_TRANS_STUB ((void *)1)
...@@ -207,7 +204,6 @@ struct btrfs_trans_handle *btrfs_join_transaction_nolock(struct btrfs_root *root ...@@ -207,7 +204,6 @@ struct btrfs_trans_handle *btrfs_join_transaction_nolock(struct btrfs_root *root
struct btrfs_trans_handle *btrfs_attach_transaction(struct btrfs_root *root); struct btrfs_trans_handle *btrfs_attach_transaction(struct btrfs_root *root);
struct btrfs_trans_handle *btrfs_attach_transaction_barrier( struct btrfs_trans_handle *btrfs_attach_transaction_barrier(
struct btrfs_root *root); struct btrfs_root *root);
struct btrfs_trans_handle *btrfs_start_ioctl_transaction(struct btrfs_root *root);
int btrfs_wait_for_commit(struct btrfs_fs_info *fs_info, u64 transid); int btrfs_wait_for_commit(struct btrfs_fs_info *fs_info, u64 transid);
void btrfs_add_dead_root(struct btrfs_root *root); void btrfs_add_dead_root(struct btrfs_root *root);
......
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