From: Darrick J. Wong Date: Tue, 19 May 2026 04:18:05 +0000 (-0700) Subject: xfs_healer: fix missing HAVE_LISTMOUNT flag and stubs X-Git-Tag: v7.0.1~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ba267fe516d8fbdcd314b3fe7ff1ff948426d297;p=xfsprogs-dev.git xfs_healer: fix missing HAVE_LISTMOUNT flag and stubs 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" Reviewed-by: Andrey Albershteyn Reviewed-by: Christoph Hellwig --- diff --git a/healer/Makefile b/healer/Makefile index b8ffce33..1db28726 100644 --- a/healer/Makefile +++ b/healer/Makefile @@ -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 diff --git a/libfrog/statmount.h b/libfrog/statmount.h index 13aaad3a..b12e6d52 100644 --- a/libfrog/statmount.h +++ b/libfrog/statmount.h @@ -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