[f2fs] code refactoring:
remove struct marks to declare variables in super.cc
(comment: #421 https://fuchsia-review.googlesource.com/c/third_party/f2fs/+/520883)
Change-Id: I6d3d63cf1b81065c411ef751385a3f58556cafc6
Reviewed-on: https://fuchsia-review.googlesource.com/c/third_party/f2fs/+/530790
Reviewed-by: Brett Wilson <brettw@google.com>
diff --git a/super.cc b/super.cc
index 2948438..edb861d 100644
--- a/super.cc
+++ b/super.cc
@@ -9,7 +9,7 @@
namespace f2fs {
#if 0 // porting needed
-// static struct kmem_cache *f2fs_inode_cachep;
+// static kmem_cache *f2fs_inode_cachep;
// enum {
// Opt_gc_background_off,
@@ -37,14 +37,14 @@
// void F2fs::InitOnce(void *foo)
// {
-// struct f2fs_inode_info *fi = (struct f2fs_inode_info *) foo;
+// f2fs_inode_info *fi = (f2fs_inode_info *) foo;
// memset(fi, 0, sizeof(*fi));
// inode_init_once(&fi->vfs_inode);
// }
// VnodeF2fs *F2fs::F2fsAllocInode() {
- // struct f2fs_inode_info *fi;
+ // f2fs_inode_info *fi;
// // fi = kmem_cache_alloc(f2fs_inode_cachep, GFP_NOFS | __GFP_ZERO);
// // if (!fi)
@@ -65,13 +65,13 @@
// return &fi->vfs_inode;
// }
-// void F2fs::F2fsICallback(struct rcu_head *head)
+// void F2fs::F2fsICallback(rcu_head *head)
// {
-// [[maybe_unused]] struct inode *inode = container_of(head, struct inode, i_rcu);
+// [[maybe_unused]] inode *inode = container_of(head, inode, i_rcu);
// // kmem_cache_free(f2fs_inode_cachep, F2FS_I(inode));
// }
-// void F2fs::F2fsDestroyInode(struct inode *inode)
+// void F2fs::F2fsDestroyInode(inode *inode)
// {
// call_rcu(&inode->i_rcu, F2fsICallback);
// }
@@ -125,9 +125,9 @@
}
#if 0 // porting needed
-// int F2fs::F2fsStatfs(struct dentry *dentry /*, struct kstatfs *buf*/) {
- // struct super_block *sb = dentry->d_sb;
- // struct f2fs_sb_info *sbi = F2FS_SB(sb);
+// int F2fs::F2fsStatfs(dentry *dentry /*, kstatfs *buf*/) {
+ // super_block *sb = dentry->d_sb;
+ // f2fs_sb_info *sbi = F2FS_SB(sb);
// u64 id = huge_encode_dev(sb->s_bdev->bd_dev);
// block_t total_count, user_block_count, start_count, ovp_count;
@@ -152,7 +152,7 @@
// return 0;
// }
-// int F2fs::F2fsShowOptions(/*struct seq_file *seq*/) {
+// int F2fs::F2fsShowOptions(/*seq_file *seq*/) {
// if (test_opt(sbi, BG_GC))
// seq_puts(seq, ",background_gc_on");
// else
@@ -198,12 +198,12 @@
// struct fid {};
-// struct dentry *F2fs::F2fsFhToDentry(struct fid *fid, int fh_len, int fh_type) {
+// dentry *F2fs::F2fsFhToDentry(fid *fid, int fh_len, int fh_type) {
// return generic_fh_to_dentry(sb, fid, fh_len, fh_type,
// f2fs_nfs_get_inode);
// }
-// struct dentry *F2fs::F2fsFhToParent(struct fid *fid, int fh_len, int fh_type) {
+// dentry *F2fs::F2fsFhToParent(fid *fid, int fh_len, int fh_type) {
// return generic_fh_to_parent(sb, fid, fh_len, fh_type,
// f2fs_nfs_get_inode);
// }
@@ -332,8 +332,8 @@
zx_status_t F2fs::F2fsFillSuper() {
#if 0 // porting needed
- // struct f2fs_super_block *raw_super;
- // struct buffer_head *raw_super_buf = NULL;
+ // f2fs_super_block *raw_super;
+ // buffer_head *raw_super_buf = NULL;
#endif
VnodeF2fs *root;
zx_status_t err = ZX_ERR_INVALID_ARGS;
@@ -345,7 +345,7 @@
memset(sbi_.get(), 0, sizeof(f2fs_sb_info));
#if 0 // porting needed
- // struct super_block *sb = sbi_->sb;
+ // super_block *sb = sbi_->sb;
/* set a temporary block size */
// if (!SbSetBlocksize(sb, F2FS_BLKSIZE))
@@ -534,7 +534,7 @@
}
#if 0 // porting needed
-// struct dentry *F2fs::F2fsMount(struct file_system_type *fs_type, int flags,
+// dentry *F2fs::F2fsMount(file_system_type *fs_type, int flags,
// const char *dev_name, void *data)
// {
// // return mount_bdev(fs_type, flags, dev_name, data, F2fs::F2fsFillSuper);
@@ -543,7 +543,7 @@
// int F2fs::InitInodecache(void) {
// f2fs_inode_cachep = f2fs_kmem_cache_create("f2fs_inode_cache",
-// sizeof(struct f2fs_inode_info), NULL);
+// sizeof(f2fs_inode_info), NULL);
// if (f2fs_inode_cachep == NULL)
// return -ENOMEM;
// }