Export jbd2_journal_unregister_shrinker() and
jbd2_journal_register_shrinker() to fix below error:
ERROR: modpost: "jbd2_journal_unregister_shrinker" undefined!
ERROR: modpost: "jbd2_journal_register_shrinker" undefined!
Fixes: 4ba3fcdde7e3 ("jbd2,ext4: add a shrinker to release checkpointed buffers")
Signed-off-by: Zhang Yi <[email protected]>
---
fs/jbd2/journal.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 7c52feb6f753..152880c298ca 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -2122,6 +2122,7 @@ int jbd2_journal_register_shrinker(journal_t *journal)
return 0;
}
+EXPORT_SYMBOL(jbd2_journal_register_shrinker);
/**
* jbd2_journal_unregister_shrinker()
@@ -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.
--
2.31.1
On Wed 30-06-21 16:36:38, Zhang Yi wrote:
> Export jbd2_journal_unregister_shrinker() and
> jbd2_journal_register_shrinker() to fix below error:
>
> ERROR: modpost: "jbd2_journal_unregister_shrinker" undefined!
> ERROR: modpost: "jbd2_journal_register_shrinker" undefined!
>
> Fixes: 4ba3fcdde7e3 ("jbd2,ext4: add a shrinker to release checkpointed buffers")
> Signed-off-by: Zhang Yi <[email protected]>
Yeah, I didn't notice this either. The fix looks good. You can add:
Reviewed-by: Jan Kara <[email protected]>
Honza
> ---
> fs/jbd2/journal.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> index 7c52feb6f753..152880c298ca 100644
> --- a/fs/jbd2/journal.c
> +++ b/fs/jbd2/journal.c
> @@ -2122,6 +2122,7 @@ int jbd2_journal_register_shrinker(journal_t *journal)
>
> return 0;
> }
> +EXPORT_SYMBOL(jbd2_journal_register_shrinker);
>
> /**
> * jbd2_journal_unregister_shrinker()
> @@ -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.
> --
> 2.31.1
>
--
Jan Kara <[email protected]>
SUSE Labs, CR
On Wed, Jun 30, 2021 at 04:36:38PM +0800, Zhang Yi wrote:
> Export jbd2_journal_unregister_shrinker() and
> jbd2_journal_register_shrinker() to fix below error:
>
> ERROR: modpost: "jbd2_journal_unregister_shrinker" undefined!
> ERROR: modpost: "jbd2_journal_register_shrinker" undefined!
>
> Fixes: 4ba3fcdde7e3 ("jbd2,ext4: add a shrinker to release checkpointed buffers")
> Signed-off-by: Zhang Yi <[email protected]>
Thanks applied, with a slightly clarified commit message:
commit e102693820c5b5bbd56958c0940e7bc2d2f80a5a
Author: Zhang Yi <[email protected]>
Date: Wed Jun 30 16:36:38 2021 +0800
jbd2: export jbd2_journal_[un]register_shrinker()
Export jbd2_journal_[un]register_shrinker() to fix this error when
building ext4 as a module:
ERROR: modpost: "jbd2_journal_unregister_shrinker" undefined!
ERROR: modpost: "jbd2_journal_register_shrinker" undefined!
Fixes: 4ba3fcdde7e3 ("jbd2,ext4: add a shrinker to release checkpointed buffers")
Signed-off-by: Zhang Yi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
- Ted