Skip to content

Commit 8d2909e

Browse files
YuezhangMonamjaejeon
authored andcommitted
exfat: remove unneeded code from exfat_alloc_cluster()
In the removed code, num_clusters is 0, nothing is done in exfat_chain_cont_cluster(), so it is unneeded, remove it. Signed-off-by: Yuezhang Mo <[email protected]> Reviewed-by: Andy Wu <[email protected]> Reviewed-by: Sungjong Seo <[email protected]> Signed-off-by: Namjae Jeon <[email protected]>
1 parent 8258ef2 commit 8d2909e

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

fs/exfat/fatent.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,7 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc,
347347
exfat_err(sb, "hint_cluster is invalid (%u)",
348348
hint_clu);
349349
hint_clu = EXFAT_FIRST_CLUSTER;
350-
if (p_chain->flags == ALLOC_NO_FAT_CHAIN) {
351-
if (exfat_chain_cont_cluster(sb, p_chain->dir,
352-
num_clusters)) {
353-
ret = -EIO;
354-
goto unlock;
355-
}
356-
p_chain->flags = ALLOC_FAT_CHAIN;
357-
}
350+
p_chain->flags = ALLOC_FAT_CHAIN;
358351
}
359352

360353
p_chain->dir = EXFAT_EOF_CLUSTER;

0 commit comments

Comments
 (0)