Btrfs: fix infinite loop in btrfs_shrink_device()
authorIlya Dryomov <idryomov@gmail.com>
Tue, 27 Mar 2012 14:09:18 +0000 (17:09 +0300)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 27 Mar 2012 14:09:18 +0000 (17:09 +0300)
commit213e64da90d14537cd63f7090d6c4d1fcc75d9f8
treec7603bcc554d033ef0521a0a7898c924930721e7
parent5eb56d2520fe16f00756ccdf8eebc277398e0f44
Btrfs: fix infinite loop in btrfs_shrink_device()

If relocate of block group 0 fails with ENOSPC we end up infinitely
looping because key.offset -= 1 statement in that case brings us back to
where we started.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/btrfs/volumes.c