Skip to contentSkip to conversation

jbd2: remove unused function '__cp_buffer_busy'

PATCH In review Yang Li 2 participants 2 messages Jun 14, 2023 Journalling layer for block devices (JBD2)

lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 jbd2: remove unused function '__cp_buffer_busy'

The code calling function '__cp_buffer_busy' has been removed, so the function should also be removed.
silence the warning:
fs/jbd2/checkpoint.c:48:20: warning: unused function '__cp_buffer_busy'

---
 fs/jbd2/checkpoint.c | 12 ------------
 1 file changed, 12 deletions(-)
fs/jbd2/checkpoint.c +0 -12
index 9ec91017a7f3..ba4ae74c7167 100644
@@ -40,18 +40,6 @@ static inline void __buffer_unlink(struct journal_head *jh)
 	}
 }
 
-/*
- * Check a checkpoint buffer could be release or not.
- *
- * Requires j_list_lock
- */
-static inline bool __cp_buffer_busy(struct journal_head *jh)
-{
-	struct buffer_head *bh = jh2bh(jh);
-
-	return (jh->b_transaction || buffer_locked(bh) || buffer_dirty(bh));
-}
-
 /*
  * __jbd2_log_wait_for_space: wait until there is space in the journal.
  *
Signature · 1 line
2.20.1.7.g153144c
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Yang Li

The code calling function '__cp_buffer_busy' has been removed, so the function should also be removed.
silence the warning:
fs/jbd2/checkpoint.c:48:20: warning: unused function '__cp_buffer_busy'

Ted is now debugging other issues possibly caused by the patch series making this function unused (CCing its author). If we need to respin to the series, we might as well just fold this fixup into it. But otherwise the patch is obviously good. Feel free to add:

Honza

Quoted 30 lines
---
 fs/jbd2/checkpoint.c | 12 ------------
 1 file changed, 12 deletions(-)
fs/jbd2/checkpoint.c +0 -12
index 9ec91017a7f3..ba4ae74c7167 100644
@@ -40,18 +40,6 @@ static inline void __buffer_unlink(struct journal_head *jh)
 	}
 }
 
-/*
- * Check a checkpoint buffer could be release or not.
- *
- * Requires j_list_lock
- */
-static inline bool __cp_buffer_busy(struct journal_head *jh)
-{
-	struct buffer_head *bh = jh2bh(jh);
-
-	return (jh->b_transaction || buffer_locked(bh) || buffer_dirty(bh));
-}
-
 /*
  * __jbd2_log_wait_for_space: wait until there is space in the journal.
  *
Signature · 1 line
2.20.1.7.g153144c
Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR