Skip to content

Commit 6697f81

Browse files
YuezhangMonamjaejeon
authored andcommitted
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: 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>
1 parent 48a5eed commit 6697f81

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
@@ -232,7 +232,7 @@ static int exfat_search_empty_slot(struct super_block *sb,
232232
dentry = 0;
233233
}
234234

235-
while (dentry + num_entries < total_entries &&
235+
while (dentry + num_entries <= total_entries &&
236236
clu.dir != EXFAT_EOF_CLUSTER) {
237237
i = dentry & (dentries_per_clu - 1);
238238

0 commit comments

Comments
 (0)