Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/3] exfat: remove useless directory scan in exfat_add_entry()
@ 2020-09-11 4:44 ` Tetsuhiro Kohada
2020-09-16 2:22 ` Sungjong Seo
0 siblings, 1 reply; 3+ messages in thread
From: Tetsuhiro Kohada @ 2020-09-11 4:44 UTC (permalink / raw)
To: kohada.t2
Cc: kohada.tetsuhiro, mori.takahiro, motai.hirotaka, Namjae Jeon,
Sungjong Seo, linux-fsdevel, linux-kernel
There is nothing in directory just created, so there is no need to scan.
Signed-off-by: Tetsuhiro Kohada <kohada.t2@gmail.com>
---
fs/exfat/namei.c | 11 +----------
1 file changed, 1 insertion(+), 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));
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH 1/3] exfat: remove useless directory scan in exfat_add_entry()
2020-09-11 4:44 ` [PATCH 1/3] exfat: remove useless directory scan in exfat_add_entry() Tetsuhiro Kohada
@ 2020-09-16 2:22 ` Sungjong Seo
2020-09-21 5:49 ` Namjae Jeon
0 siblings, 1 reply; 3+ messages in thread
From: Sungjong Seo @ 2020-09-16 2:22 UTC (permalink / raw)
To: 'Tetsuhiro Kohada'
Cc: kohada.tetsuhiro, mori.takahiro, motai.hirotaka,
'Namjae Jeon',
linux-fsdevel, linux-kernel
> 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>
> ---
> fs/exfat/namei.c | 11 +----------
> 1 file changed, 1 insertion(+), 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));
> --
> 2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/3] exfat: remove useless directory scan in exfat_add_entry()
2020-09-16 2:22 ` Sungjong Seo
@ 2020-09-21 5:49 ` Namjae Jeon
0 siblings, 0 replies; 3+ messages in thread
From: Namjae Jeon @ 2020-09-21 5:49 UTC (permalink / raw)
To: Tetsuhiro Kohada
Cc: Sungjong Seo, kohada.tetsuhiro, mori.takahiro, motai.hirotaka,
Namjae Jeon, linux-fsdevel, linux-kernel
2020-09-15 19:22 GMT-07:00, Sungjong Seo <sj1557.seo@samsung.com>:
>> 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>
Applied. Thanks for your patch!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-09-21 5:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20200911044449epcas1p42ecc35423eebc3b62428b14529d6a592@epcas1p4.samsung.com>
2020-09-11 4:44 ` [PATCH 1/3] exfat: remove useless directory scan in exfat_add_entry() Tetsuhiro Kohada
2020-09-16 2:22 ` Sungjong Seo
2020-09-21 5:49 ` Namjae Jeon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).