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:52:51 +0000 (09:52 -0700)
commit8617e195f2213c885c5aae3578c545a5ace9477b
tree02159f9e24e448cbbdde4e13f5f85c56928fef7b
parentab053f76fec843ab4db48390319de701d654e9a1
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