mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 21:38:32 +08:00
UBI: add sanity check
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
This commit is contained in:
parent
2f9270e7fe
commit
64203195ed
@ -286,9 +286,14 @@ static int compare_lebs(struct ubi_device *ubi, const struct ubi_scan_leb *seb,
|
||||
* FIXME: but this is anyway obsolete and will be removed at
|
||||
* some point.
|
||||
*/
|
||||
|
||||
dbg_bld("using old crappy leb_ver stuff");
|
||||
|
||||
if (v1 == v2) {
|
||||
ubi_err("PEB %d and PEB %d have the same version %lld",
|
||||
seb->pnum, pnum, v1);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
abs = v1 - v2;
|
||||
if (abs < 0)
|
||||
abs = -abs;
|
||||
|
Loading…
Reference in New Issue
Block a user