aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuezhang Mo <[email protected]>2023-02-06 18:25:20 +0800
committerNamjae Jeon <[email protected]>2023-02-28 20:01:22 +0900
commit8d2909eeca5ef41f64365f700b1fdde361086609 (patch)
tree3c1be88edab94fa3b3db1fd4548c8f4472671e18
parent8258ef28001ad30c074e823124e10b9c75a965ff (diff)
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]>
-rw-r--r--fs/exfat/fatent.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/exfat/fatent.c b/fs/exfat/fatent.c
index 41ae4cce1f42..65a8c9fb072c 100644
--- a/fs/exfat/fatent.c
+++ b/fs/exfat/fatent.c
@@ -347,14 +347,7 @@ int exfat_alloc_cluster(struct inode *inode, unsigned int num_alloc,
exfat_err(sb, "hint_cluster is invalid (%u)",
hint_clu);
hint_clu = EXFAT_FIRST_CLUSTER;
- if (p_chain->flags == ALLOC_NO_FAT_CHAIN) {
- if (exfat_chain_cont_cluster(sb, p_chain->dir,
- num_clusters)) {
- ret = -EIO;
- goto unlock;
- }
- p_chain->flags = ALLOC_FAT_CHAIN;
- }
+ p_chain->flags = ALLOC_FAT_CHAIN;
}
p_chain->dir = EXFAT_EOF_CLUSTER;