summaryrefslogtreecommitdiff
path: root/scripts/const_structs.checkpatch
diff options
context:
space:
mode:
authorZhihao Cheng <chengzhihao1@huawei.com>2026-07-04 16:30:41 +0800
committerRichard Weinberger <richard@nod.at>2026-08-11 23:33:18 +0200
commitbe04fce9945aac2a843f5d16725391eb80d948ef (patch)
tree5f210916078784e8bd9d7f1c12217293859017c8 /scripts/const_structs.checkpatch
parent420477a84f1e52babfe60a43dbdd0988ed956845 (diff)
downloadlinux-be04fce9945aac2a843f5d16725391eb80d948ef.tar.gz
linux-be04fce9945aac2a843f5d16725391eb80d948ef.zip
UBI: fastmap: Pass to_be_tortured when reusing old fastmap PEBs
In ubi_update_fastmap(), when no fresh PEB is available to replace an old fastmap PEB, the old PEB is reused by erasing it synchronously via ubi_sync_erase() with the torture flag hardcoded to zero. However, old_fm->to_be_tortured[] may be non-zero: it is set during fastmap scanning when ubi_io_read_data()/ubi_io_read_ec_hdr() reports UBI_IO_BITFLIPS, meaning the PEB showed signs of bit decay and should be tortured to verify it is still reliable. When the old PEB is instead returned to the WL sub-system via ubi_wl_put_fm_peb(), the to_be_tortured flag is honored. The synchronous reuse path is inconsistent: it silently skips the torture test for PEBs that exhibited bit-flips. Fix it by passing &old_fm->to_be_tortured[i] to ubi_sync_erase(). Fixes: dbb7d2a88d2a ("UBI: Add fastmap core") Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'scripts/const_structs.checkpatch')
0 files changed, 0 insertions, 0 deletions