mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2024-12-03 00:54:17 +08:00
btrfs-progs: tests: move do_fallocate under HAVE_LINUX_FALLOC_H in fsstress.c
Move the entire 'do_fallocate' function under the 'HAVE_LINUX_FALLOC_H' define and fix the following warnings. This function is called only when 'HAVE_LINUX_FALLOC_H' is defined. tests/fsstress.c:3814:1: warning: ‘do_fallocate’ defined but not used [-Wunused-function] 3814 | do_fallocate(opnum_t opno, long r, int mode) Signed-off-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
282c05698a
commit
b31f1e6988
@ -3810,10 +3810,10 @@ struct print_flags falloc_flags [] = {
|
||||
({translate_flags(mode, "|", falloc_flags);})
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LINUX_FALLOC_H
|
||||
static void
|
||||
do_fallocate(opnum_t opno, long r, int mode)
|
||||
{
|
||||
#ifdef HAVE_LINUX_FALLOC_H
|
||||
int e;
|
||||
pathname_t f;
|
||||
int fd;
|
||||
@ -3870,8 +3870,8 @@ do_fallocate(opnum_t opno, long r, int mode)
|
||||
f.path, st, (long long)off, (long long)len, e);
|
||||
free_pathname(&f);
|
||||
close(fd);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
fallocate_f(opnum_t opno, long r)
|
||||
|
Loading…
Reference in New Issue
Block a user