summaryrefslogtreecommitdiff
path: root/include/linux/errqueue.h
diff options
context:
space:
mode:
authorDaeMyung Kang <charsyam@gmail.com>2026-06-08 18:49:16 +0300
committerNamjae Jeon <linkinjeon@kernel.org>2026-06-09 15:50:59 +0300
commite782ca90ceb798bb1811b214bf814216f11aae6a (patch)
treef5d26a188a4cac83f08dd474ffecaf3c704bdc30 /include/linux/errqueue.h
parent0bb508fb3b97e4802ec727fd2af4d608f65dd190 (diff)
downloadlinux-e782ca90ceb798bb1811b214bf814216f11aae6a.tar.xz
ntfs: update index root allocated size before shrink
ntfs_ir_truncate() currently shrinks the resident $INDEX_ROOT value first and only updates index.allocated_size after re-looking up the attribute. During that relookup, the resident value_length can already be smaller while index.allocated_size still contains the old larger size. That leaves a transiently inconsistent $INDEX_ROOT layout and prevents lookup-time $INDEX_ROOT validation from being enabled: validation can correctly reject allocated_size extending past the newly shrunk resident value. When shrinking, lower index.allocated_size before shrinking value_length. If the truncate fails, restore the old allocated_size. Keep the existing grow ordering because the old allocated_size remains within the enlarged resident value until it is updated after the relookup. The shrink path is safe because the new value_length still covers struct index_root, so the index.allocated_size field remains present while it is updated first. Cc: stable@vger.kernel.org # v7.1 Signed-off-by: DaeMyung Kang <charsyam@gmail.com> Reviewed-by: Hyunchul Lee <hyc.lee@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'include/linux/errqueue.h')
0 files changed, 0 insertions, 0 deletions