Skip to content

Commit 3b6fe7d

Browse files
committed
exfat: fix just enough dentries but allocate a new cluster to dir
JIRA: https://issues.redhat.com/browse/RHEL-89708 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: af02c72 ("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> (cherry picked from commit 6697f81) Signed-off-by: Pavel Reichl <preichl@redhat.com>
1 parent 5369b81 commit 3b6fe7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/exfat/namei.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static int exfat_search_empty_slot(struct super_block *sb,
237237
dentry = 0;
238238
}
239239

240-
while (dentry + num_entries < total_entries &&
240+
while (dentry + num_entries <= total_entries &&
241241
clu.dir != EXFAT_EOF_CLUSTER) {
242242
i = dentry & (dentries_per_clu - 1);
243243

0 commit comments

Comments
 (0)