0002-statmount02-Remove-linux-btrfs.h.patch 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. From fe8c0dac5ab4aa49c4f977d14f8a8d24cefa6435 Mon Sep 17 00:00:00 2001
  2. From: Petr Vorel <pvorel@suse.cz>
  3. Date: Wed, 4 Jun 2025 16:13:18 +0200
  4. Subject: [PATCH] statmount02: Remove <linux/btrfs.h>
  5. statmount02.c does not need <linux/btrfs.h> because it's skipped.
  6. Avoid using it fixes the problem due the old problem of indirect include
  7. <linux/mount.h> by <linux/fs.h> on Alpine v3.22 (the default Alpine
  8. version in GitHub action), which uses 6.14.2 kernel headers:
  9. In file included from /usr/include/linux/fs.h:19,
  10. from /usr/include/linux/btrfs.h:29,
  11. from statmount02.c:23:
  12. /usr/include/linux/mount.h:155:8: error: redefinition of 'struct statmount'
  13. 155 | struct statmount {
  14. | ^~~~~~~~~
  15. In file included from statmount.h:12,
  16. from statmount02.c:20:
  17. ../../../../include/lapi/mount.h:58:8: note: originally defined here
  18. 58 | struct statmount {
  19. | ^~~~~~~~~
  20. /usr/include/linux/mount.h:193:8: error: redefinition of 'struct mnt_id_req'
  21. 193 | struct mnt_id_req {
  22. | ^~~~~~~~~~
  23. ../../../../include/lapi/mount.h:49:8: note: originally defined here
  24. 49 | struct mnt_id_req {
  25. | ^~~~~~~~~~
  26. Fixes: 5f9942dffe ("Add statmount02 test")
  27. Suggested-by: Jan Stancek <jstancek@redhat.com>
  28. Signed-off-by: Petr Vorel <pvorel@suse.cz>
  29. Upstream: https://github.com/linux-test-project/ltp/commit/fe8c0dac5ab4aa49c4f977d14f8a8d24cefa6435
  30. ---
  31. testcases/kernel/syscalls/statmount/statmount02.c | 1 -
  32. 1 file changed, 1 deletion(-)
  33. diff --git a/testcases/kernel/syscalls/statmount/statmount02.c b/testcases/kernel/syscalls/statmount/statmount02.c
  34. index 504c558a11..07f877e040 100644
  35. --- a/testcases/kernel/syscalls/statmount/statmount02.c
  36. +++ b/testcases/kernel/syscalls/statmount/statmount02.c
  37. @@ -20,7 +20,6 @@
  38. #include "statmount.h"
  39. #include "lapi/stat.h"
  40. #include "lapi/sched.h"
  41. -#include <linux/btrfs.h>
  42. #define MNTPOINT "mntpoint"
  43. --
  44. 2.50.0