summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorDaeMyung Kang <charsyam@gmail.com>2026-10-17 12:40:50 +0900
committerNamjae Jeon <linkinjeon@kernel.org>2026-10-21 08:55:33 +0900
commit9455e920aebe41217cabff3f81e90da4c407fdb6 (patch)
treeeaff538771ba43111f1ac6b9427a7aa84abd69e6 /scripts/Makefile.thinlto
parent318cd7461a7facb9cd5f7a5d1580fd874440e035 (diff)
downloadlinux-9455e920aebe41217cabff3f81e90da4c407fdb6.tar.gz
linux-9455e920aebe41217cabff3f81e90da4c407fdb6.zip
ksmbd: avoid restoring only in-memory EOF after allocation change
When SetAllocation requests a size below the allocated block count but above EOF, ksmbd truncates the file to that size and restores only the in-memory i_size. The larger EOF remains on disk and reappears after a reboot. A 3-byte file preallocated to 64 KiB can acquire a 4 KiB EOF after reducing its allocation to 4 KiB. Extending EOF this way is not a reliable way to reclaim the preallocation beyond the old EOF either. Only use this truncate path when the requested allocation is at or below the observed EOF. A truncate to the existing EOF still lets filesystems release preallocated blocks beyond EOF. Remove the in-memory-only i_size restoration. The size check still precedes vfs_truncate() taking the inode lock, so a concurrent shrink can make the truncate extend EOF; that race also existed in the original path. Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3") Cc: stable@vger.kernel.org Signed-off-by: DaeMyung Kang <charsyam@gmail.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions