diff options
author | Yuezhang Mo <Yuezhang.Mo@sony.com> | 2022-11-17 04:37:13 +0100 |
---|---|---|
committer | Namjae Jeon <linkinjeon@kernel.org> | 2022-12-12 03:02:49 +0100 |
commit | 20914ff6dd56dd6b548bf5dd90bff09ef89999e4 (patch) | |
tree | 7e984b672e38e57f2302f3435bab1b3e83985ce7 /fs/exfat/exfat_fs.h | |
parent | exfat: support dynamic allocate bh for exfat_entry_set_cache (diff) | |
download | linux-20914ff6dd56dd6b548bf5dd90bff09ef89999e4.tar.xz linux-20914ff6dd56dd6b548bf5dd90bff09ef89999e4.zip |
exfat: move exfat_entry_set_cache from heap to stack
The size of struct exfat_entry_set_cache is only 56 bytes on
64-bit system, and allocating from stack is more efficient than
allocating from heap.
Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Andy Wu <Andy.Wu@sony.com>
Reviewed-by: Aoyama Wataru <wataru.aoyama@sony.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'fs/exfat/exfat_fs.h')
-rw-r--r-- | fs/exfat/exfat_fs.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/exfat/exfat_fs.h b/fs/exfat/exfat_fs.h index 82395ae80dba..2ffe5792b1a9 100644 --- a/fs/exfat/exfat_fs.h +++ b/fs/exfat/exfat_fs.h @@ -490,8 +490,9 @@ struct exfat_dentry *exfat_get_dentry(struct super_block *sb, struct exfat_chain *p_dir, int entry, struct buffer_head **bh); struct exfat_dentry *exfat_get_dentry_cached(struct exfat_entry_set_cache *es, int num); -struct exfat_entry_set_cache *exfat_get_dentry_set(struct super_block *sb, - struct exfat_chain *p_dir, int entry, unsigned int type); +int exfat_get_dentry_set(struct exfat_entry_set_cache *es, + struct super_block *sb, struct exfat_chain *p_dir, int entry, + unsigned int type); int exfat_free_dentry_set(struct exfat_entry_set_cache *es, int sync); int exfat_count_dir_entries(struct super_block *sb, struct exfat_chain *p_dir); |