Skip to content

Commit 7437176

Browse files
LiBaokun96tytso
authored andcommitted
jbd2: remove jbd2_journal_unfile_buffer()
Since the function jbd2_journal_unfile_buffer() is no longer called anywhere after commit e5a120a ("jbd2: remove journal_head from descriptor buffers"), so let's remove it. Signed-off-by: Baokun Li <libaokun1@huawei.com> Reviewed-by: Zhang Yi <yi.zhang@huawei.com> Reviewed-by: Jan Kara <jack@suse.cz> Link: https://patch.msgid.link/20250306063240.157884-1-libaokun@huaweicloud.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 1b419c8 commit 7437176

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

fs/jbd2/transaction.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2075,21 +2075,6 @@ static void __jbd2_journal_unfile_buffer(struct journal_head *jh)
20752075
jh->b_transaction = NULL;
20762076
}
20772077

2078-
void jbd2_journal_unfile_buffer(journal_t *journal, struct journal_head *jh)
2079-
{
2080-
struct buffer_head *bh = jh2bh(jh);
2081-
2082-
/* Get reference so that buffer cannot be freed before we unlock it */
2083-
get_bh(bh);
2084-
spin_lock(&jh->b_state_lock);
2085-
spin_lock(&journal->j_list_lock);
2086-
__jbd2_journal_unfile_buffer(jh);
2087-
spin_unlock(&journal->j_list_lock);
2088-
spin_unlock(&jh->b_state_lock);
2089-
jbd2_journal_put_journal_head(jh);
2090-
__brelse(bh);
2091-
}
2092-
20932078
/**
20942079
* jbd2_journal_try_to_free_buffers() - try to free page buffers.
20952080
* @journal: journal for operation

include/linux/jbd2.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1396,7 +1396,6 @@ JBD2_FEATURE_INCOMPAT_FUNCS(fast_commit, FAST_COMMIT)
13961396
*/
13971397

13981398
/* Filing buffers */
1399-
extern void jbd2_journal_unfile_buffer(journal_t *, struct journal_head *);
14001399
extern bool __jbd2_journal_refile_buffer(struct journal_head *);
14011400
extern void jbd2_journal_refile_buffer(journal_t *, struct journal_head *);
14021401
extern void __jbd2_journal_file_buffer(struct journal_head *, transaction_t *, int);

0 commit comments

Comments
 (0)