mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
empty_mntns.h includes ../statmount/statmount.h which provides a
4-argument statmount_alloc(mnt_id, mnt_ns_id, mask, flags), but then
redefines its own 3-argument version without the flags parameter. This
causes a build failure due to conflicting types.
Remove the duplicate definition from empty_mntns.h and update all
callers to pass 0 for the flags argument.
Fixes: 32f54f2bbc ("selftests/filesystems: add tests for empty mount namespaces")
Signed-off-by: Christian Brauner <brauner@kernel.org>
26 lines
491 B
C
26 lines
491 B
C
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
#ifndef EMPTY_MNTNS_H
|
|
#define EMPTY_MNTNS_H
|
|
|
|
#include <errno.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "../statmount/statmount.h"
|
|
|
|
#ifndef UNSHARE_EMPTY_MNTNS
|
|
#define UNSHARE_EMPTY_MNTNS 0x00100000
|
|
#endif
|
|
|
|
#ifndef CLONE_EMPTY_MNTNS
|
|
#define CLONE_EMPTY_MNTNS (1ULL << 37)
|
|
#endif
|
|
|
|
static inline ssize_t count_mounts(void)
|
|
{
|
|
uint64_t list[4096];
|
|
|
|
return listmount(LSMT_ROOT, 0, 0, list, sizeof(list) / sizeof(list[0]), 0);
|
|
}
|
|
|
|
#endif /* EMPTY_MNTNS_H */
|