]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
jbd2: remove jbd2_journal_unfile_buffer()
authorBaokun Li <libaokun1@huawei.com>
Thu, 6 Mar 2025 06:32:40 +0000 (14:32 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 18 Mar 2025 04:15:25 +0000 (00:15 -0400)
Since the function jbd2_journal_unfile_buffer() is no longer called
anywhere after commit e5a120aeb57f ("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>
fs/jbd2/transaction.c
include/linux/jbd2.h

index 27dfdfda972d9bf2cecb36a5ea0aecf96a50c58e..cbc4785462f537083572c33473b62b7ebd91eb19 100644 (file)
@@ -2075,21 +2075,6 @@ static void __jbd2_journal_unfile_buffer(struct journal_head *jh)
        jh->b_transaction = NULL;
 }
 
-void jbd2_journal_unfile_buffer(journal_t *journal, struct journal_head *jh)
-{
-       struct buffer_head *bh = jh2bh(jh);
-
-       /* Get reference so that buffer cannot be freed before we unlock it */
-       get_bh(bh);
-       spin_lock(&jh->b_state_lock);
-       spin_lock(&journal->j_list_lock);
-       __jbd2_journal_unfile_buffer(jh);
-       spin_unlock(&journal->j_list_lock);
-       spin_unlock(&jh->b_state_lock);
-       jbd2_journal_put_journal_head(jh);
-       __brelse(bh);
-}
-
 /**
  * jbd2_journal_try_to_free_buffers() - try to free page buffers.
  * @journal: journal for operation
index c211de10e9c8a5b16cf72a8db2d69d824de8312d..023e8abdb99a77ef250cc7a1bad800738cdf3547 100644 (file)
@@ -1396,7 +1396,6 @@ JBD2_FEATURE_INCOMPAT_FUNCS(fast_commit,  FAST_COMMIT)
  */
 
 /* Filing buffers */
-extern void jbd2_journal_unfile_buffer(journal_t *, struct journal_head *);
 extern bool __jbd2_journal_refile_buffer(struct journal_head *);
 extern void jbd2_journal_refile_buffer(journal_t *, struct journal_head *);
 extern void __jbd2_journal_file_buffer(struct journal_head *, transaction_t *, int);