Skip to content

exfat: fix cluster allocation accounting and locking

Chi Zhiling exfat lkml 1 version Applied

Status from this message: Applied them to #dev.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2exfat: fix used_clusters accounting during cluster allocationfs/exfat/fatent.c+1 -10 replies
2/2exfat: take bitmap_lock at the start of exfat_alloc_cluster()fs/exfat/fatent.c+10 -73 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

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

From: Chi Zhiling <[email protected]>

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(-)
Signature · 1 line
2.53.0