linux-stable/fs/ubifs
Li Hua 7508453ede ubifs: Fix build errors as symbol undefined
[ Upstream commit aa6d148e6d ]

With CONFIG_UBIFS_FS_AUTHENTICATION not set, the compiler can assume that
ubifs_node_check_hash() is never true and drops the call to ubifs_bad_hash().
Is CONFIG_CC_OPTIMIZE_FOR_SIZE enabled this optimization does not happen anymore.

So When CONFIG_UBIFS_FS and CONFIG_CC_OPTIMIZE_FOR_SIZE is enabled but
CONFIG_UBIFS_FS_AUTHENTICATION is not set, the build errors is as followd:
    ERROR: modpost: "ubifs_bad_hash" [fs/ubifs/ubifs.ko] undefined!

Fix it by add no-op ubifs_bad_hash() for the CONFIG_UBIFS_FS_AUTHENTICATION=n case.

Fixes: 16a26b20d2 ("ubifs: authentication: Add hashes to index nodes")
Signed-off-by: Li Hua <hucool.lihua@huawei.com>
Reviewed-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 13:55:19 +01:00
..
auth.c
budget.c ubifs: Simplify the return expression of run_gc() 2022-05-27 16:21:20 +02:00
commit.c
compress.c
crypto.c ubifs: Fix UBIFS ro fail due to truncate in the encrypted directory 2022-09-21 11:32:38 +02:00
debug.c treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
debug.h
dir.c This pull request contains updates for UBI and UBIFS 2022-10-14 18:23:23 -07:00
file.c ubifs: Convert to filemap_migrate_folio() 2022-08-02 12:34:04 -04:00
find.c
gc.c ubifs: read-only if LEB may always be taken in ubifs_garbage_collect 2021-12-23 22:30:38 +01:00
io.c ubifs: Fix read out-of-bounds in ubifs_wbuf_write_nolock() 2022-01-10 22:58:27 +01:00
ioctl.c ubifs: setflags: Make dirtied_ino_d 8 bytes aligned 2022-01-10 22:18:42 +01:00
journal.c Random number generator fixes for Linux 6.1-rc1. 2022-10-16 15:27:07 -07:00
Kconfig
key.h
log.c
lprops.c
lpt.c
lpt_commit.c treewide: use prandom_u32_max() when possible, part 1 2022-10-11 17:42:55 -06:00
Makefile ubifs: Export filesystem error counters 2021-12-23 20:23:42 +01:00
master.c ubifs: Fix spelling mistakes 2021-06-22 09:21:39 +02:00
misc.c
misc.h
orphan.c
recovery.c
replay.c ubifs: Fix spelling mistakes 2021-12-23 20:23:40 +01:00
sb.c
scan.c
shrinker.c
super.c mm: shrinkers: provide shrinkers with names 2022-07-03 18:08:40 -07:00
sysfs.c ubifs: use default_groups in kobj_type 2022-01-26 15:57:19 +01:00
tnc.c
tnc_commit.c treewide: use prandom_u32_max() when possible, part 1 2022-10-11 17:42:55 -06:00
tnc_misc.c
ubifs-media.h
ubifs.h ubifs: Fix build errors as symbol undefined 2023-03-11 13:55:19 +01:00
xattr.c ubifs: Fix AA deadlock when setting xattr for encrypted file 2022-09-21 11:32:58 +02:00