mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
exfat: fix just enough dentries but allocate a new cluster to dir
This commit fixes the condition for allocating cluster to parent
directory to avoid allocating new cluster to parent directory when
there are just enough empty directory entries at the end of the
parent directory.
Fixes: af02c72d0b ("exfat: convert exfat_find_empty_entry() to use dentry cache")
Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
This commit is contained in:
parent
48a5eed9ad
commit
6697f819a1
|
|
@ -232,7 +232,7 @@ static int exfat_search_empty_slot(struct super_block *sb,
|
|||
dentry = 0;
|
||||
}
|
||||
|
||||
while (dentry + num_entries < total_entries &&
|
||||
while (dentry + num_entries <= total_entries &&
|
||||
clu.dir != EXFAT_EOF_CLUSTER) {
|
||||
i = dentry & (dentries_per_clu - 1);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user