]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commitdiff
xfs_healer: fix missing HAVE_LISTMOUNT flag and stubs
authorDarrick J. Wong <djwong@kernel.org>
Tue, 19 May 2026 04:18:05 +0000 (21:18 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Tue, 19 May 2026 08:46:48 +0000 (10:46 +0200)
xfs/666 regressed with a broken xfs_healer_start that can't actually
walk the mount namespace with listmount and statmount.  The new stubs
are wrapped with HAVE_LISTMOUNT, but this cflag is not added in healer/
Makefile even if the build system has HAVE_LISTMOUNT set.

Also fix the stubs to return error correctly -- the wrappers follow C
library behavior.

Fixes: b30356f25335eb ("libfrog: add fallback stubs for libfrog_statmount and fstatmount")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
healer/Makefile
libfrog/statmount.h

index b8ffce33e90d185e8bb916e4e60ad01d18a8e9bd..1db2872617241b01586add329535a7307b76b27a 100644 (file)
@@ -21,6 +21,10 @@ xfs_healer.h
 
 CFLAGS+=-DXFS_SCRUB_SVCNAME=\"$(XFS_SCRUB_SVCNAME)\"
 
+ifeq ($(HAVE_LISTMOUNT),yes)
+CFLAGS += -DHAVE_LISTMOUNT
+endif
+
 LLDLIBS += $(LIBHANDLE) $(LIBFROG) $(LIBURCU) $(LIBPTHREAD)
 LTDEPENDENCIES += $(LIBHANDLE) $(LIBFROG)
 LLDFLAGS = -static
index 13aaad3a99dca1c8ee1afc2b6783a397649f968e..b12e6d52ea5749ca3e8ef51448c2cb05d0ab69cf 100644 (file)
@@ -107,12 +107,14 @@ int libfrog_fstatmount(int fd, uint64_t statmount_flags,
 static inline int libfrog_statmount(uint64_t mnt_id, int mnt_ns_fd, uint64_t statmount_flags,
                struct statmount *smbuf, size_t smbuf_size)
 {
-       return -ENOSYS;
+       errno = ENOSYS;
+       return -1;
 }
 static inline int libfrog_fstatmount(int fd, uint64_t statmount_flags,
                struct statmount *smbuf, size_t smbuf_size)
 {
-       return -ENOSYS;
+       errno = ENOSYS;
+       return -1;
 }
 #endif