summaryrefslogtreecommitdiff
path: root/include/linux/xarray.h
diff options
context:
space:
mode:
authorRochan Avlur <rochan.avlur@gmail.com>2026-05-28 17:21:37 +0300
committerNamjae Jeon <linkinjeon@kernel.org>2026-06-15 14:00:53 +0300
commit942296784b2a9439651750c42f540bf2579b330f (patch)
treee2739edf7acd8ba76891994b255ade6ca2186f6b /include/linux/xarray.h
parentc7034e0bcb087754317d058b1149bb53e0a13213 (diff)
downloadlinux-942296784b2a9439651750c42f540bf2579b330f.tar.xz
exfat: preserve benign secondary entries during rename and move
Commit 8258ef28001a ("exfat: handle unreconized benign secondary entries") added cluster freeing for benign secondary entries inside exfat_remove_entries(). However, exfat_remove_entries() is also called from the rename and move paths (exfat_rename_file and exfat_move_file), where the old entry set is being relocated rather than deleted. This causes benign secondary entries such as vendor extension entries to be silently destroyed on rename or cross-directory move, violating the exFAT spec requirement (section 8.2) that implementations preserve unrecognized benign secondary entries. Fix this by adding a free_benign parameter to exfat_remove_entries() so callers can suppress cluster freeing during relocation, and extending exfat_init_ext_entry() to copy trailing benign secondary entries from the old entry set into the new one internally. Also clean up the error paths to delete newly allocated entries on failure. Fixes: 8258ef28001a ("exfat: handle unreconized benign secondary entries") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-fsdevel/CAG7tbBV--waov7XVu2FHQEc6paR92dufS=em9DW5Kzsrpu3iQg@mail.gmail.com/ Signed-off-by: Rochan Avlur <rochan.avlur@gmail.com> Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'include/linux/xarray.h')
0 files changed, 0 insertions, 0 deletions