Btrfs: fix unnecessary while loop when search the free space, cache
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 18 Oct 2012 08:18:01 +0000 (08:18 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Tue, 11 Dec 2012 18:31:33 +0000 (13:31 -0500)
When we find a bitmap free space entry, we may check the previous extent
entry covers the offset or not. But if we find this entry is also a bitmap
entry, we will continue to check the previous entry of the current one by
a while loop. It is unnecessary because it is impossible that the extent
entry which is in front of a bitmap entry can cover the offset of the entry
after that bitmap entry.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Reviewed-by: Liu Bo <bo.li.liu@oracle.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
fs/btrfs/free-space-cache.c

Simple merge