Skip to content

Commit 0d89682

Browse files
nathanchanceJaegeuk Kim
authored andcommitted
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: 4ed886b ("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>
1 parent 991b6bd commit 0d89682

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/f2fs/f2fs.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4602,8 +4602,8 @@ static inline bool f2fs_need_verity(const struct inode *inode, pgoff_t idx)
46024602
extern int f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned long rate,
46034603
unsigned long type);
46044604
#else
4605-
static int f2fs_build_fault_attr(struct f2fs_sb_info *sbi, unsigned long rate,
4606-
unsigned long type)
4605+
static inline int f2fs_build_fault_attr(struct f2fs_sb_info *sbi,
4606+
unsigned long rate, unsigned long type)
46074607
{
46084608
return 0;
46094609
}

0 commit comments

Comments
 (0)