summaryrefslogtreecommitdiffstats
path: root/arch/arm/boot/dts/aspeed/aspeed-g4.dtsi
diff options
context:
space:
mode:
authorYuezhang Mo <Yuezhang.Mo@sony.com>2024-02-16 20:19:55 +0800
committerNamjae Jeon <linkinjeon@kernel.org>2024-02-18 14:41:18 +0900
commit3a7845041eb7235f2fb00ef0960995da5be63b11 (patch)
tree7bf4953fad0f8f1ac6362ab222592a123d3a5033 /arch/arm/boot/dts/aspeed/aspeed-g4.dtsi
parentc02197fc9076e7d991c8f6adc11759c5ba52ddc6 (diff)
downloadlinux-stable-3a7845041eb7235f2fb00ef0960995da5be63b11.tar.gz
linux-stable-3a7845041eb7235f2fb00ef0960995da5be63b11.tar.bz2
linux-stable-3a7845041eb7235f2fb00ef0960995da5be63b11.zip
exfat: fix appending discontinuous clusters to empty file
Eric Hong found that when using ftruncate to expand an empty file, exfat_ent_set() will fail if discontinuous clusters are allocated. The reason is that the empty file does not have a cluster chain, but exfat_ent_set() attempts to append the newly allocated cluster to the cluster chain. In addition, exfat_find_last_cluster() only supports finding the last cluster in a non-empty file. So this commit adds a check whether the file is empty. If the file is empty, exfat_find_last_cluster() and exfat_ent_set() are no longer called as they do not need to be called. Fixes: f55c096f62f1 ("exfat: do not zero the extended part") Reported-by: Eric Hong <erichong@qnap.com> Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com> Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'arch/arm/boot/dts/aspeed/aspeed-g4.dtsi')
0 files changed, 0 insertions, 0 deletions