diff options
author | Li zeming | 2022-10-12 18:42:35 +0800 |
---|---|---|
committer | Jan Kara | 2022-10-24 16:49:00 +0200 |
commit | 0dafb7e671f0e769c854609548037754a68dcbc6 (patch) | |
tree | c46611da7760ae62fcfbc7b4fced4e30f73a53f0 /fs/udf | |
parent | 247f34f7b80357943234f93f247a1ae6b6c3a740 (diff) |
fs: udf: Optimize udf_free_in_core_inode and udf_find_fileset function
These two functions perform the following optimizations.
1. Delete the type cast of foo pointer. Void * does not need to convert
the type.
2. Delete the initialization assignment of bh variable, which is
assigned first.
Signed-off-by: Li zeming <zeming@nfschina.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20221012104235.3331-1-zeming@nfschina.com
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/super.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/udf/super.c b/fs/udf/super.c index 4042d9739fb7..06eda8177b5f 100644 --- a/fs/udf/super.c +++ b/fs/udf/super.c @@ -162,7 +162,7 @@ static void udf_free_in_core_inode(struct inode *inode) static void init_once(void *foo) { - struct udf_inode_info *ei = (struct udf_inode_info *)foo; + struct udf_inode_info *ei = foo; ei->i_data = NULL; inode_init_once(&ei->vfs_inode); @@ -820,7 +820,7 @@ static int udf_find_fileset(struct super_block *sb, struct kernel_lb_addr *fileset, struct kernel_lb_addr *root) { - struct buffer_head *bh = NULL; + struct buffer_head *bh; uint16_t ident; int ret; |