Skip to contentSkip to conversation

ext4: remove unused i_fc_wait

PATCH Applied Li Chen 3 participants 3 messages Jan 20 – Apr 10 ext4 file system

lore
Share & tools
lore

Li Chen

author
#0 lore raw

PATCH 1/1 ext4: remove unused i_fc_wait

i_fc_wait is only initialized in ext4_fc_init_inode() and never used for waiting or wakeups. Drop it.

---
 fs/ext4/ext4.h        | 4 ----
 fs/ext4/fast_commit.c | 2 +-
 2 files changed, 1 insertion(+), 5 deletions(-)
fs/ext4/ext4.h +0 -4
index 56112f201cac..dc3a5a926eff 100644
@@ -28,7 +28,6 @@
 #include <linux/seqlock.h>
 #include <linux/mutex.h>
 #include <linux/timer.h>
-#include <linux/wait.h>
 #include <linux/sched/signal.h>
 #include <linux/blockgroup_lock.h>
 #include <linux/percpu_counter.h>
@@ -1091,9 +1090,6 @@ struct ext4_inode_info {
 
 	spinlock_t i_raw_lock;	/* protects updates to the raw inode */
 
-	/* Fast commit wait queue for this inode */
-	wait_queue_head_t i_fc_wait;
-
 	/*
 	 * Protect concurrent accesses on i_fc_lblk_start, i_fc_lblk_len
 	 * and inode's EXT4_FC_STATE_COMMITTING state bit.
fs/ext4/fast_commit.c +1 -1
index fa66b08de999..86789989b3f4 100644
@@ -13,6 +13,7 @@
 #include "mballoc.h"
 
 #include <linux/lockdep.h>
+#include <linux/wait_bit.h>
 /*
  * Ext4 Fast Commits
  * -----------------
@@ -215,7 +216,6 @@ void ext4_fc_init_inode(struct inode *inode)
 	ext4_clear_inode_state(inode, EXT4_STATE_FC_COMMITTING);
 	INIT_LIST_HEAD(&ei->i_fc_list);
 	INIT_LIST_HEAD(&ei->i_fc_dilist);
-	init_waitqueue_head(&ei->i_fc_wait);
 }
 
 static bool ext4_fc_disabled(struct super_block *sb)
Signature · 1 line
2.52.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Li Chen

i_fc_wait is only initialized in ext4_fc_init_inode() and never used for waiting or wakeups. Drop it.

Thank you for the cleanup, it looks good to me.

Quoted 47 lines
---
  fs/ext4/ext4.h        | 4 ----
  fs/ext4/fast_commit.c | 2 +-
  2 files changed, 1 insertion(+), 5 deletions(-)
fs/ext4/ext4.h +0 -4
index 56112f201cac..dc3a5a926eff 100644
@@ -28,7 +28,6 @@
  #include <linux/seqlock.h>
  #include <linux/mutex.h>
  #include <linux/timer.h>
-#include <linux/wait.h>
  #include <linux/sched/signal.h>
  #include <linux/blockgroup_lock.h>
  #include <linux/percpu_counter.h>
@@ -1091,9 +1090,6 @@ struct ext4_inode_info {
 
  	spinlock_t i_raw_lock;	/* protects updates to the raw inode */
 
-	/* Fast commit wait queue for this inode */
-	wait_queue_head_t i_fc_wait;
-
  	/*
  	 * Protect concurrent accesses on i_fc_lblk_start, i_fc_lblk_len
  	 * and inode's EXT4_FC_STATE_COMMITTING state bit.
fs/ext4/fast_commit.c +1 -1
index fa66b08de999..86789989b3f4 100644
@@ -13,6 +13,7 @@
  #include "mballoc.h"
 
  #include <linux/lockdep.h>
+#include <linux/wait_bit.h>
  /*
   * Ext4 Fast Commits
   * -----------------
@@ -215,7 +216,6 @@ void ext4_fc_init_inode(struct inode *inode)
  	ext4_clear_inode_state(inode, EXT4_STATE_FC_COMMITTING);
  	INIT_LIST_HEAD(&ei->i_fc_list);
  	INIT_LIST_HEAD(&ei->i_fc_dilist);
-	init_waitqueue_head(&ei->i_fc_wait);
  }
 
  static bool ext4_fc_disabled(struct super_block *sb)
maintainer Applied
#2 lore raw
In reply to Li Chen
Quoted 2 lines · Li Chen

i_fc_wait is only initialized in ext4_fc_init_inode() and never used for waiting or wakeups. Drop it.

Applied, thanks!

[1/1] ext4: remove unused i_fc_wait

      commit: eb10607628acd1408a02e49b545e6421bb7a6ea2

Best regards,

Signature · 1 line
Theodore Ts'o <[email protected]>