exfat: fix the newly allocated clusters are not freed in error handling
authorYuezhang Mo <Yuezhang.Mo@sony.com>
Fri, 10 Feb 2023 05:33:44 +0000 (13:33 +0800)
committerNamjae Jeon <linkinjeon@kernel.org>
Tue, 28 Feb 2023 11:01:40 +0000 (20:01 +0900)
commitd5c514b6a0c0b77ed7e5ef2484e8b20eb09c5f27
tree169f90d4c9457dba80685c1677237e1cd0b0de51
parent3ce937cb8ca9becec406611c6072e93030fdde76
exfat: fix the newly allocated clusters are not freed in error handling

In error handling 'free_cluster', before num_alloc clusters allocated,
p_chain->size will not updated and always 0, thus the newly allocated
clusters are not freed.

Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Andy Wu <Andy.Wu@sony.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
fs/exfat/fatent.c