diff options
author | Nathan Chancellor <nathan@kernel.org> | 2024-05-13 17:40:27 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2024-05-15 06:18:35 +0200 |
commit | 0d8968287a1cf7b03d07387dc871de3861b9f6b9 (patch) | |
tree | 22f03c8f8c28b47d2f86e30655e4fca1a8300924 /fs/f2fs | |
parent | f2fs: fix some ambiguous comments (diff) | |
download | linux-0d8968287a1cf7b03d07387dc871de3861b9f6b9.tar.xz linux-0d8968287a1cf7b03d07387dc871de3861b9f6b9.zip |
f2fs: Add inline to f2fs_build_fault_attr() stub
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>
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/f2fs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h index ef7de97be647..1974b6aff397 100644 --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -4602,8 +4602,8 @@ static inline bool f2fs_need_verity(const struct inode *inode, pgoff_t idx) extern int f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned long rate, unsigned long type); #else -static int f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned long rate, - unsigned long type) +static inline int f2fs_build_fault_attr(struct f2fs_sb_info *sbi, + unsigned long rate, unsigned long type) { return 0; } |