diff options
-rw-r--r-- | fs/btrfs/disk-io.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 4c4ed0bb3da1..8072cfa8a3b1 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -3517,7 +3517,6 @@ int btrfs_cleanup_fs_roots(struct btrfs_fs_info *fs_info) | |||
3517 | int btrfs_commit_super(struct btrfs_root *root) | 3517 | int btrfs_commit_super(struct btrfs_root *root) |
3518 | { | 3518 | { |
3519 | struct btrfs_trans_handle *trans; | 3519 | struct btrfs_trans_handle *trans; |
3520 | int ret; | ||
3521 | 3520 | ||
3522 | mutex_lock(&root->fs_info->cleaner_mutex); | 3521 | mutex_lock(&root->fs_info->cleaner_mutex); |
3523 | btrfs_run_delayed_iputs(root); | 3522 | btrfs_run_delayed_iputs(root); |
@@ -3531,25 +3530,7 @@ int btrfs_commit_super(struct btrfs_root *root) | |||
3531 | trans = btrfs_join_transaction(root); | 3530 | trans = btrfs_join_transaction(root); |
3532 | if (IS_ERR(trans)) | 3531 | if (IS_ERR(trans)) |
3533 | return PTR_ERR(trans); | 3532 | return PTR_ERR(trans); |
3534 | ret = btrfs_commit_transaction(trans, root); | 3533 | return btrfs_commit_transaction(trans, root); |
3535 | if (ret) | ||
3536 | return ret; | ||
3537 | /* run commit again to drop the original snapshot */ | ||
3538 | trans = btrfs_join_transaction(root); | ||
3539 | if (IS_ERR(trans)) | ||
3540 | return PTR_ERR(trans); | ||
3541 | ret = btrfs_commit_transaction(trans, root); | ||
3542 | if (ret) | ||
3543 | return ret; | ||
3544 | ret = btrfs_write_and_wait_transaction(NULL, root); | ||
3545 | if (ret) { | ||
3546 | btrfs_error(root->fs_info, ret, | ||
3547 | "Failed to sync btree inode to disk."); | ||
3548 | return ret; | ||
3549 | } | ||
3550 | |||
3551 | ret = write_ctree_super(NULL, root, 0); | ||
3552 | return ret; | ||
3553 | } | 3534 | } |
3554 | 3535 | ||
3555 | int close_ctree(struct btrfs_root *root) | 3536 | int close_ctree(struct btrfs_root *root) |