diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-10 18:19:25 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-07-26 07:54:26 -0400 |
commit | 66642832f06a4351e23cea6cf254967c227f8224 (patch) | |
tree | 8ae0bc5a61945bdec42d6c7a929967c548031d5d /fs/btrfs/root-tree.c | |
parent | 64b63580728ef19137d35363a1c28794b70ad416 (diff) |
btrfs: btrfs_abort_transaction, drop root parameter
__btrfs_abort_transaction doesn't use its root parameter except to
obtain an fs_info pointer. We can obtain that from trans->root->fs_info
for now and from trans->fs_info in a later patch.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/root-tree.c')
-rw-r--r-- | fs/btrfs/root-tree.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c index f1c30861d062..7fd7e1830cfe 100644 --- a/fs/btrfs/root-tree.c +++ b/fs/btrfs/root-tree.c | |||
@@ -150,7 +150,7 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root | |||
150 | 150 | ||
151 | ret = btrfs_search_slot(trans, root, key, path, 0, 1); | 151 | ret = btrfs_search_slot(trans, root, key, path, 0, 1); |
152 | if (ret < 0) { | 152 | if (ret < 0) { |
153 | btrfs_abort_transaction(trans, root, ret); | 153 | btrfs_abort_transaction(trans, ret); |
154 | goto out; | 154 | goto out; |
155 | } | 155 | } |
156 | 156 | ||
@@ -176,20 +176,20 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root | |||
176 | ret = btrfs_search_slot(trans, root, key, path, | 176 | ret = btrfs_search_slot(trans, root, key, path, |
177 | -1, 1); | 177 | -1, 1); |
178 | if (ret < 0) { | 178 | if (ret < 0) { |
179 | btrfs_abort_transaction(trans, root, ret); | 179 | btrfs_abort_transaction(trans, ret); |
180 | goto out; | 180 | goto out; |
181 | } | 181 | } |
182 | 182 | ||
183 | ret = btrfs_del_item(trans, root, path); | 183 | ret = btrfs_del_item(trans, root, path); |
184 | if (ret < 0) { | 184 | if (ret < 0) { |
185 | btrfs_abort_transaction(trans, root, ret); | 185 | btrfs_abort_transaction(trans, ret); |
186 | goto out; | 186 | goto out; |
187 | } | 187 | } |
188 | btrfs_release_path(path); | 188 | btrfs_release_path(path); |
189 | ret = btrfs_insert_empty_item(trans, root, path, | 189 | ret = btrfs_insert_empty_item(trans, root, path, |
190 | key, sizeof(*item)); | 190 | key, sizeof(*item)); |
191 | if (ret < 0) { | 191 | if (ret < 0) { |
192 | btrfs_abort_transaction(trans, root, ret); | 192 | btrfs_abort_transaction(trans, ret); |
193 | goto out; | 193 | goto out; |
194 | } | 194 | } |
195 | l = path->nodes[0]; | 195 | l = path->nodes[0]; |
@@ -448,7 +448,7 @@ again: | |||
448 | ret = btrfs_insert_empty_item(trans, tree_root, path, &key, | 448 | ret = btrfs_insert_empty_item(trans, tree_root, path, &key, |
449 | sizeof(*ref) + name_len); | 449 | sizeof(*ref) + name_len); |
450 | if (ret) { | 450 | if (ret) { |
451 | btrfs_abort_transaction(trans, tree_root, ret); | 451 | btrfs_abort_transaction(trans, ret); |
452 | btrfs_free_path(path); | 452 | btrfs_free_path(path); |
453 | return ret; | 453 | return ret; |
454 | } | 454 | } |