Skip to content

Commit

Permalink
jbd2: export jbd2_journal_[un]register_shrinker()
Browse files Browse the repository at this point in the history
Export jbd2_journal_[un]register_shrinker() to fix this error when
ext4 is built as a module:

  ERROR: modpost: "jbd2_journal_unregister_shrinker" undefined!
  ERROR: modpost: "jbd2_journal_register_shrinker" undefined!

Fixes: 4ba3fcd ("jbd2,ext4: add a shrinker to release checkpointed buffers")
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20210630083638.140218-1-yi.zhang@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  • Loading branch information
Zhang Yi authored and Theodore Ts'o committed Jun 30, 2021
1 parent d578b99 commit 16aa4c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/jbd2/journal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2122,6 +2122,7 @@ int jbd2_journal_register_shrinker(journal_t *journal)

return 0;
}
EXPORT_SYMBOL(jbd2_journal_register_shrinker);

/**
* jbd2_journal_unregister_shrinker()
Expand All @@ -2134,6 +2135,7 @@ void jbd2_journal_unregister_shrinker(journal_t *journal)
percpu_counter_destroy(&journal->j_jh_shrink_count);
unregister_shrinker(&journal->j_shrinker);
}
EXPORT_SYMBOL(jbd2_journal_unregister_shrinker);

/**
* jbd2_journal_destroy() - Release a journal_t structure.
Expand Down

0 comments on commit 16aa4c9

Please sign in to comment.