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>
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
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