]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
btrfs: untangle gotos a bit in __set_extent_bit
authorDavid Sterba <dsterba@suse.com>
Tue, 26 Apr 2016 23:02:15 +0000 (01:02 +0200)
committerDavid Sterba <dsterba@suse.com>
Fri, 29 Apr 2016 09:01:47 +0000 (11:01 +0200)
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c

index 0c9b11924f7457863a4dec3217c0014dab49742e..f5eda54e225fa1d3cfa8e19306100642109d05a6 100644 (file)
@@ -1037,7 +1037,13 @@ __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
                goto out;
        }
 
-       goto search_again;
+search_again:
+       if (start > end)
+               goto out;
+       spin_unlock(&tree->lock);
+       if (gfpflags_allow_blocking(mask))
+               cond_resched();
+       goto again;
 
 out:
        spin_unlock(&tree->lock);
@@ -1046,13 +1052,6 @@ __set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,
 
        return err;
 
-search_again:
-       if (start > end)
-               goto out;
-       spin_unlock(&tree->lock);
-       if (gfpflags_allow_blocking(mask))
-               cond_resched();
-       goto again;
 }
 
 int set_extent_bit(struct extent_io_tree *tree, u64 start, u64 end,