]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
f2fs: Add inline to f2fs_build_fault_attr() stub
authorNathan Chancellor <nathan@kernel.org>
Mon, 13 May 2024 15:40:27 +0000 (08:40 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:44:24 +0000 (07:44 +0200)
commite7d3a0c7bf77b884e3c6d9229d8b707050bec57a
tree98feb580bb3330c51ad6d0e2b3cb87b907c4656c
parentc7dc74ab7975c9b96284abfe4cca756d75fa4604
f2fs: Add inline to f2fs_build_fault_attr() stub

commit 0d8968287a1cf7b03d07387dc871de3861b9f6b9 upstream.

When building without CONFIG_F2FS_FAULT_INJECTION, there is a warning
from each file that includes f2fs.h because the stub for
f2fs_build_fault_attr() is missing inline:

  In file included from fs/f2fs/segment.c:21:
  fs/f2fs/f2fs.h:4605:12: warning: 'f2fs_build_fault_attr' defined but not used [-Wunused-function]
   4605 | static int f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned long rate,
        |            ^~~~~~~~~~~~~~~~~~~~~

Add the missing inline to resolve all of the warnings for this
configuration.

Fixes: 4ed886b187f4 ("f2fs: check validation of fault attrs in f2fs_build_fault_attr()")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/f2fs.h