UBI: fix eraseblock picking criteria
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Wed, 7 Mar 2012 17:08:36 +0000 (19:08 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Fri, 9 Mar 2012 07:39:31 +0000 (09:39 +0200)
commit7eb3aa65853e1b223bfc786b023b702018cb76c0
tree3242d8bbff42f7ec5c2678790683471ff4c54861
parentadd8287e3fa2160229117c9e1b7c9ca8cb661423
UBI: fix eraseblock picking criteria

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>
Cc: stable@kernel.org
drivers/mtd/ubi/wl.c