UBI: fix eraseblock picking criteria
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 7 Mar 2012 17:08:36 +0000 (19:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Apr 2012 16:27:17 +0000 (09:27 -0700)
commit5f1968d427434ea1c0745d75428008e26334bde8
treec60d6ab234ac32f5e12eb33fbb322753c891858b
parent8f418747ea2d87c1394d357b1996ffd6579ae9f4
UBI: fix eraseblock picking criteria

commit 7eb3aa65853e1b223bfc786b023b702018cb76c0 upstream.

The 'find_wl_entry()' function expects the maximum difference as the second
argument, not the maximum absolute value. So the "unknown" eraseblock picking
was incorrect, as Shmulik Ladkani spotted. This patch fixes the issue.

Reported-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/ubi/wl.c