[PATCH 0/2] exfat: fix cluster allocation accounting and locking

Chi Zhiling posted 2 patches 2 weeks, 6 days ago
fs/exfat/fatent.c | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
[PATCH 0/2] exfat: fix cluster allocation accounting and locking
Posted by Chi Zhiling 2 weeks, 6 days ago
From: Chi Zhiling <chizhiling@kylinos.cn>

Patch 1 fixes sbi->used_clusters accounting when cluster allocation
fails partway through. This can cause the counter to underflow.
The issue is caught by generic/476.

Patch 2 takes bitmap_lock before checking and allocating clusters.


Chi Zhiling (2):
  exfat: fix used_clusters accounting during cluster allocation
  exfat: take bitmap_lock at the start of exfat_alloc_cluster()

 fs/exfat/fatent.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

-- 
2.53.0
Re: [PATCH 0/2] exfat: fix cluster allocation accounting and locking
Posted by Namjae Jeon 2 weeks, 6 days ago
On Sat, Sep 5, 2026 at 2:50 PM Chi Zhiling <chizhiling@163.com> wrote:
>
> From: Chi Zhiling <chizhiling@kylinos.cn>
>
> Patch 1 fixes sbi->used_clusters accounting when cluster allocation
> fails partway through. This can cause the counter to underflow.
> The issue is caught by generic/476.
>
> Patch 2 takes bitmap_lock before checking and allocating clusters.
>
>
> Chi Zhiling (2):
>   exfat: fix used_clusters accounting during cluster allocation
>   exfat: take bitmap_lock at the start of exfat_alloc_cluster()
Applied them to #dev.
Thanks!