diff options
author | Tetsuhiro Kohada <kohada.t2@gmail.com> | 2020-09-11 07:44:39 +0300 |
---|---|---|
committer | Namjae Jeon <namjae.jeon@samsung.com> | 2020-10-22 02:29:11 +0300 |
commit | 6c958a09555515684947d94bfcfa8e8a414f0572 (patch) | |
tree | e01d1f61a3b0d3766e766a08338d21a097990f1d /fs/exfat/namei.c | |
parent | 188df41f212c9282f6cb05b832383ffca3c66893 (diff) | |
download | linux-6c958a09555515684947d94bfcfa8e8a414f0572.tar.xz |
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: Tetsuhiro Kohada <kohada.t2@gmail.com>
Acked-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Diffstat (limited to 'fs/exfat/namei.c')
-rw-r--r-- | fs/exfat/namei.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c index b966b9120c9c..803748946ddb 100644 --- a/fs/exfat/namei.c +++ b/fs/exfat/namei.c @@ -530,19 +530,10 @@ static int exfat_add_entry(struct inode *inode, const char *path, info->size = 0; info->num_subdirs = 0; } else { - int count; - struct exfat_chain cdir; - info->attr = ATTR_SUBDIR; info->start_clu = start_clu; info->size = clu_size; - - 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; + info->num_subdirs = EXFAT_MIN_SUBDIR; } memset(&info->crtime, 0, sizeof(info->crtime)); memset(&info->mtime, 0, sizeof(info->mtime)); |