]> Pileus Git - ~andy/linux/blobdiff - fs/btrfs/tree-log.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland...
[~andy/linux] / fs / btrfs / tree-log.c
index 4aff766d171aa68a97202ce7b820c966972ea245..741666a7676a80a6553f5b22a37a41dd31971d3e 100644 (file)
@@ -1995,12 +1995,13 @@ int btrfs_sync_log(struct btrfs_trans_handle *trans,
        if (atomic_read(&root->log_commit[(index1 + 1) % 2]))
                wait_log_commit(trans, root, root->log_transid - 1);
 
-       while (root->log_multiple_pids) {
+       while (1) {
                unsigned long batch = root->log_batch;
-               mutex_unlock(&root->log_mutex);
-               schedule_timeout_uninterruptible(1);
-               mutex_lock(&root->log_mutex);
-
+               if (root->log_multiple_pids) {
+                       mutex_unlock(&root->log_mutex);
+                       schedule_timeout_uninterruptible(1);
+                       mutex_lock(&root->log_mutex);
+               }
                wait_for_writer(trans, root);
                if (batch == root->log_batch)
                        break;
@@ -2628,7 +2629,7 @@ static noinline int copy_items(struct btrfs_trans_handle *trans,
                                                                extent);
                                cs = btrfs_file_extent_offset(src, extent);
                                cl = btrfs_file_extent_num_bytes(src,
-                                                               extent);;
+                                                               extent);
                                if (btrfs_file_extent_compression(src,
                                                                  extent)) {
                                        cs = 0;