]> www.infradead.org Git - users/jedix/linux-maple.git/commit
exfat: fix erroneous discard when clear cluster bit
authorHyeongseok Kim <hyeongseok@gmail.com>
Thu, 4 Mar 2021 00:15:34 +0000 (09:15 +0900)
committerNamjae Jeon <namjae.jeon@samsung.com>
Fri, 19 Mar 2021 07:12:36 +0000 (16:12 +0900)
commit47292dce3d12e595027d47ed8818ac101f8fc2d8
tree231a1ea444c5ffcbb665f6fb0c1972a75069c076
parent1e28eed17697bcf343c6743f0028cc3b5dd88bf0
exfat: fix erroneous discard when clear cluster bit

If mounted with discard option, exFAT issues discard command when clear
cluster bit to remove file. But the input parameter of cluster-to-sector
calculation is abnormally added by reserved cluster size which is 2,
leading to discard unrelated sectors included in target+2 cluster.
With fixing this, remove the wrong comments in set/clear/find bitmap
functions.

Fixes: 1e49a94cf707 ("exfat: add bitmap operations")
Cc: stable@vger.kernel.org # v5.7+
Signed-off-by: Hyeongseok Kim <hyeongseok@gmail.com>
Acked-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
fs/exfat/balloc.c