diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2011-07-13 23:17:14 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2011-08-01 14:30:47 -0400 |
commit | b9c8300c2ac354d850159f301d5b3ead13854cdd (patch) | |
tree | 3c8a07481fda046b52d098780ea2eb02ac5b7e8d /fs/btrfs/transaction.c | |
parent | 72d63ed6427cf233e2b352c0b80c3e5c5a444986 (diff) |
Btrfs: remove a BUG_ON() in btrfs_commit_transaction()
wait_for_commit() always returns 0.
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r-- | fs/btrfs/transaction.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index ff5549fe4624..7dc36fab4afc 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c | |||
@@ -351,11 +351,10 @@ struct btrfs_trans_handle *btrfs_start_ioctl_transaction(struct btrfs_root *root | |||
351 | } | 351 | } |
352 | 352 | ||
353 | /* wait for a transaction commit to be fully complete */ | 353 | /* wait for a transaction commit to be fully complete */ |
354 | static noinline int wait_for_commit(struct btrfs_root *root, | 354 | static noinline void wait_for_commit(struct btrfs_root *root, |
355 | struct btrfs_transaction *commit) | 355 | struct btrfs_transaction *commit) |
356 | { | 356 | { |
357 | wait_event(commit->commit_wait, commit->commit_done); | 357 | wait_event(commit->commit_wait, commit->commit_done); |
358 | return 0; | ||
359 | } | 358 | } |
360 | 359 | ||
361 | int btrfs_wait_for_commit(struct btrfs_root *root, u64 transid) | 360 | int btrfs_wait_for_commit(struct btrfs_root *root, u64 transid) |
@@ -1189,8 +1188,7 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans, | |||
1189 | atomic_inc(&cur_trans->use_count); | 1188 | atomic_inc(&cur_trans->use_count); |
1190 | btrfs_end_transaction(trans, root); | 1189 | btrfs_end_transaction(trans, root); |
1191 | 1190 | ||
1192 | ret = wait_for_commit(root, cur_trans); | 1191 | wait_for_commit(root, cur_trans); |
1193 | BUG_ON(ret); | ||
1194 | 1192 | ||
1195 | put_transaction(cur_trans); | 1193 | put_transaction(cur_trans); |
1196 | 1194 | ||