Btrfs: Refactor btrfs_lock_cluster() to kill compiler warning
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 22 Jun 2014 12:30:09 +0000 (14:30 +0200)
committerDavid Sterba <dsterba@suse.com>
Thu, 28 Apr 2016 08:36:54 +0000 (10:36 +0200)
commit6719afdcf808b38145095b2e485c0f90bfc29722
treea677091790f4d82d1a0be567187b193ae428ab63
parent0713d90c75745dc6148f6346d490e9ef63a4e8b4
Btrfs: Refactor btrfs_lock_cluster() to kill compiler warning

fs/btrfs/extent-tree.c: In function ‘btrfs_lock_cluster’:
fs/btrfs/extent-tree.c:6399: warning: ‘used_bg’ may be used uninitialized in this function

  - Replace "again: ... goto again;" by standard C "while (1) { ... }",
  - Move block not processed during the first iteration of the loop to the
    end of the loop, which allows to kill the "locked" variable,

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-and-Tested-by: Miao Xie <miaox@cn.fujitsu.com>
[ the compilation warning has been fixed by other patch, now we want to
  clean up the function ]
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c