]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/btrfs/tree-defrag.c
Merge remote branch 'tip/perf/urgent' into oprofile/urgent
[mv-sheeva.git] / fs / btrfs / tree-defrag.c
index 98d25fa4570ea902abc4c8345ecf29f62af9013c..f7ac8e013ed73459139ae07b00189ffa952bba08 100644 (file)
@@ -117,15 +117,14 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
                                 path->nodes[1], 0,
                                 cache_only, &last_ret,
                                 &root->defrag_progress);
-       WARN_ON(ret && ret != -EAGAIN);
+       if (ret) {
+               WARN_ON(ret == -EAGAIN);
+               goto out;
+       }
        if (next_key_ret == 0) {
                memcpy(&root->defrag_progress, &key, sizeof(key));
                ret = -EAGAIN;
        }
-
-       btrfs_release_path(root, path);
-       if (is_extent)
-               btrfs_extent_post_op(trans, root);
 out:
        if (path)
                btrfs_free_path(path);