Skip to contentSkip to conversation

ocfs2: cleanup implemented prototypes

Ocfs2-devel Joseph Qi 2 participants 4 messages Jul 1, 2016 – Jul 4, 2016 OCFS2

lore
Share & tools
lore

Joseph Qi

author
#0 lore raw

Several prototypes in inode.h are just defined but not actually implemented and used, so remove them.

---
 fs/ocfs2/inode.h | 7 -------
 fs/ocfs2/super.c | 1 -
 2 files changed, 8 deletions(-)
fs/ocfs2/inode.h +0 -7
index d8f3fc8..50cc550 100644
@@ -145,22 +145,15 @@ int ocfs2_drop_inode(struct inode *inode);
 struct inode *ocfs2_ilookup(struct super_block *sb, u64 feoff);
 struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 feoff, unsigned flags,
 			 int sysfile_type);
-int ocfs2_inode_init_private(struct inode *inode);
 int ocfs2_inode_revalidate(struct dentry *dentry);
 void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,
 			  int create_ino);
-void ocfs2_read_inode(struct inode *inode);
-void ocfs2_read_inode2(struct inode *inode, void *opaque);
-ssize_t ocfs2_rw_direct(int rw, struct file *filp, char *buf,
-			size_t size, loff_t *offp);
 void ocfs2_sync_blockdev(struct super_block *sb);
 void ocfs2_refresh_inode(struct inode *inode,
 			 struct ocfs2_dinode *fe);
 int ocfs2_mark_inode_dirty(handle_t *handle,
 			   struct inode *inode,
 			   struct buffer_head *bh);
-struct buffer_head *ocfs2_bread(struct inode *inode,
-				int block, int *err, int reada);
 
 void ocfs2_set_inode_flags(struct inode *inode);
 void ocfs2_get_inode_flags(struct ocfs2_inode_info *oi);
fs/ocfs2/super.c +0 -1
index d7cae33..d97de21 100644
@@ -2072,7 +2072,6 @@ static int ocfs2_initialize_super(struct super_block *sb,
 	osb->osb_dx_seed[3] = le32_to_cpu(di->id2.i_super.s_uuid_hash);
 
 	osb->sb = sb;
-	/* Save off for ocfs2_rw_direct */
 	osb->s_sectsize_bits = blksize_bits(sector_size);
 	BUG_ON(!osb->s_sectsize_bits);
 
Signature · 1 line
1.8.4.3
#1 lore raw

Hi Joseph,

Please see comments inline;-)

Quoted 23 lines · Joseph Qi

Several prototypes in inode.h are just defined but not actually implemented and used, so remove them.

---
  fs/ocfs2/inode.h | 7 -------
  fs/ocfs2/super.c | 1 -
  2 files changed, 8 deletions(-)
fs/ocfs2/inode.h +0 -3
index d8f3fc8..50cc550 100644
@@ -145,22 +145,15 @@ int ocfs2_drop_inode(struct inode *inode);
  struct inode *ocfs2_ilookup(struct super_block *sb, u64 feoff);
  struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 feoff, unsigned flags,
  			 int sysfile_type);
-int ocfs2_inode_init_private(struct inode *inode);
  int ocfs2_inode_revalidate(struct dentry *dentry);
  void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,
  			  int create_ino);
-void ocfs2_read_inode(struct inode *inode);
-void ocfs2_read_inode2(struct inode *inode, void *opaque);

fs/ocfs2/inode.h int ocfs2_drop_inode(struct inode *inode); · line 163

Quoted 10 lines
fs/ocfs2/inode.h +0 -4
-ssize_t ocfs2_rw_direct(int rw, struct file *filp, char *buf,
-			size_t size, loff_t *offp);
  void ocfs2_sync_blockdev(struct super_block *sb);
  void ocfs2_refresh_inode(struct inode *inode,
  			 struct ocfs2_dinode *fe);
  int ocfs2_mark_inode_dirty(handle_t *handle,
  			   struct inode *inode,
  			   struct buffer_head *bh);
-struct buffer_head *ocfs2_bread(struct inode *inode,
-				int block, int *err, int reada);

grep shows "ocfs2_bread" also appears in dir.c:511, could you take a look at?

Eric

Quoted 15 lines
fs/ocfs2/inode.h +0 -0
  void ocfs2_set_inode_flags(struct inode *inode);
  void ocfs2_get_inode_flags(struct ocfs2_inode_info *oi);
fs/ocfs2/super.c +0 -1
index d7cae33..d97de21 100644
@@ -2072,7 +2072,6 @@ static int ocfs2_initialize_super(struct super_block *sb,
  	osb->osb_dx_seed[3] = le32_to_cpu(di->id2.i_super.s_uuid_hash);
 
  	osb->sb = sb;
-	/* Save off for ocfs2_rw_direct */
  	osb->s_sectsize_bits = blksize_bits(sector_size);
  	BUG_ON(!osb->s_sectsize_bits);
 
author
#2 lore raw

It's comments of ocfs2_read_dir_block, I have kept it as I think it still makes sense.

Thanks,
Joseph

Quoted 63 lines · Eric Ren

Hi Joseph,

Please see comments inline;-)

Quoted 23 lines · Joseph Qi

Several prototypes in inode.h are just defined but not actually implemented and used, so remove them.

---
  fs/ocfs2/inode.h | 7 -------
  fs/ocfs2/super.c | 1 -
  2 files changed, 8 deletions(-)
fs/ocfs2/inode.h +0 -3
index d8f3fc8..50cc550 100644
@@ -145,22 +145,15 @@ int ocfs2_drop_inode(struct inode *inode);
  struct inode *ocfs2_ilookup(struct super_block *sb, u64 feoff);
  struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 feoff, unsigned flags,
               int sysfile_type);
-int ocfs2_inode_init_private(struct inode *inode);
  int ocfs2_inode_revalidate(struct dentry *dentry);
  void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,
                int create_ino);
-void ocfs2_read_inode(struct inode *inode);
-void ocfs2_read_inode2(struct inode *inode, void *opaque);

fs/ocfs2/inode.h int ocfs2_drop_inode(struct inode *inode); · line 163

Quoted 10 lines
fs/ocfs2/inode.h +0 -4
-ssize_t ocfs2_rw_direct(int rw, struct file *filp, char *buf,
-            size_t size, loff_t *offp);
  void ocfs2_sync_blockdev(struct super_block *sb);
  void ocfs2_refresh_inode(struct inode *inode,
               struct ocfs2_dinode *fe);
  int ocfs2_mark_inode_dirty(handle_t *handle,
                 struct inode *inode,
                 struct buffer_head *bh);
-struct buffer_head *ocfs2_bread(struct inode *inode,
-                int block, int *err, int reada);

grep shows "ocfs2_bread" also appears in dir.c:511, could you take a look at?

Eric

Quoted 8 lines
fs/ocfs2/inode.h +0 -0
  void ocfs2_set_inode_flags(struct inode *inode);
  void ocfs2_get_inode_flags(struct ocfs2_inode_info *oi);
fs/ocfs2/super.c +0 -0
index d7cae33..d97de21 100644

fs/ocfs2/super.c static int ocfs2_initialize_super(struct super_block *sb, · line 2077

Quoted 7 lines
fs/ocfs2/super.c +0 -1
@@ -2072,7 +2072,6 @@ static int ocfs2_initialize_super(struct super_block *sb,
      osb->osb_dx_seed[3] = le32_to_cpu(di->id2.i_super.s_uuid_hash);
 
      osb->sb = sb;
-    /* Save off for ocfs2_rw_direct */
      osb->s_sectsize_bits = blksize_bits(sector_size);
      BUG_ON(!osb->s_sectsize_bits);
 

.

#3 lore raw

Hi Joseph,

Quoted 2 lines · Joseph Qi

It's comments of ocfs2_read_dir_block, I have kept it as I think it still makes sense.

Yes, I see it. Well, perhaps reword the comments is better? Comment with a no longer existing function name is confusing, anyway;-)

Quoted 70 lines

Thanks,
Joseph

Quoted 63 lines · Eric Ren

Hi Joseph,

Please see comments inline;-)

Quoted 23 lines · Joseph Qi

Several prototypes in inode.h are just defined but not actually implemented and used, so remove them.

---
   fs/ocfs2/inode.h | 7 -------
   fs/ocfs2/super.c | 1 -
   2 files changed, 8 deletions(-)
fs/ocfs2/inode.h +0 -3
index d8f3fc8..50cc550 100644
@@ -145,22 +145,15 @@ int ocfs2_drop_inode(struct inode *inode);
   struct inode *ocfs2_ilookup(struct super_block *sb, u64 feoff);
   struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 feoff, unsigned flags,
                int sysfile_type);
-int ocfs2_inode_init_private(struct inode *inode);
   int ocfs2_inode_revalidate(struct dentry *dentry);
   void ocfs2_populate_inode(struct inode *inode, struct ocfs2_dinode *fe,
                 int create_ino);
-void ocfs2_read_inode(struct inode *inode);
-void ocfs2_read_inode2(struct inode *inode, void *opaque);

fs/ocfs2/inode.h int ocfs2_drop_inode(struct inode *inode); · line 163

Quoted 10 lines
fs/ocfs2/inode.h +0 -4
-ssize_t ocfs2_rw_direct(int rw, struct file *filp, char *buf,
-            size_t size, loff_t *offp);
   void ocfs2_sync_blockdev(struct super_block *sb);
   void ocfs2_refresh_inode(struct inode *inode,
                struct ocfs2_dinode *fe);
   int ocfs2_mark_inode_dirty(handle_t *handle,
                  struct inode *inode,
                  struct buffer_head *bh);
-struct buffer_head *ocfs2_bread(struct inode *inode,
-                int block, int *err, int reada);

grep shows "ocfs2_bread" also appears in dir.c:511, could you take a look at?

Eric

Quoted 8 lines
fs/ocfs2/inode.h +0 -0
   void ocfs2_set_inode_flags(struct inode *inode);
   void ocfs2_get_inode_flags(struct ocfs2_inode_info *oi);
fs/ocfs2/super.c +0 -0
index d7cae33..d97de21 100644

fs/ocfs2/super.c static int ocfs2_initialize_super(struct super_block *sb, · line 2077

Quoted 7 lines
fs/ocfs2/super.c +0 -1
@@ -2072,7 +2072,6 @@ static int ocfs2_initialize_super(struct super_block *sb,
       osb->osb_dx_seed[3] = le32_to_cpu(di->id2.i_super.s_uuid_hash);
 
       osb->sb = sb;
-    /* Save off for ocfs2_rw_direct */
       osb->s_sectsize_bits = blksize_bits(sector_size);
       BUG_ON(!osb->s_sectsize_bits);
 

.