Commit 6c958a09 authored by Tetsuhiro Kohada's avatar Tetsuhiro Kohada Committed by Namjae Jeon

exfat: remove useless directory scan in exfat_add_entry()

There is nothing in directory just created, so there is no need to scan.
Signed-off-by: default avatarTetsuhiro Kohada <kohada.t2@gmail.com>
Acked-by: default avatarSungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
parent 188df41f
...@@ -530,19 +530,10 @@ static int exfat_add_entry(struct inode *inode, const char *path, ...@@ -530,19 +530,10 @@ static int exfat_add_entry(struct inode *inode, const char *path,
info->size = 0; info->size = 0;
info->num_subdirs = 0; info->num_subdirs = 0;
} else { } else {
int count;
struct exfat_chain cdir;
info->attr = ATTR_SUBDIR; info->attr = ATTR_SUBDIR;
info->start_clu = start_clu; info->start_clu = start_clu;
info->size = clu_size; info->size = clu_size;
info->num_subdirs = EXFAT_MIN_SUBDIR;
exfat_chain_set(&cdir, info->start_clu,
EXFAT_B_TO_CLU(info->size, sbi), info->flags);
count = exfat_count_dir_entries(sb, &cdir);
if (count < 0)
return -EIO;
info->num_subdirs = count + EXFAT_MIN_SUBDIR;
} }
memset(&info->crtime, 0, sizeof(info->crtime)); memset(&info->crtime, 0, sizeof(info->crtime));
memset(&info->mtime, 0, sizeof(info->mtime)); memset(&info->mtime, 0, sizeof(info->mtime));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment