From: Christian Brauner Date: Fri, 19 Jul 2024 11:41:48 +0000 (+0200) Subject: fs: use all available ids X-Git-Tag: v6.11-rc1~56^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8eac5358ad3bbc007156a0f9ea5637ee7ae421b5;p=thirdparty%2Fkernel%2Flinux.git fs: use all available ids The counter is unconditionally incremented for each mount allocation. If we set it to 1ULL << 32 we're losing 4294967296 as the first valid non-32 bit mount id. Link: https://lore.kernel.org/r/20240719-work-mount-namespace-v1-1-834113cab0d2@kernel.org Reviewed-by: Josef Bacik Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner --- diff --git a/fs/namespace.c b/fs/namespace.c index 221db9de47296..328087a4df8a6 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -70,7 +70,7 @@ static DEFINE_IDA(mnt_id_ida); static DEFINE_IDA(mnt_group_ida); /* Don't allow confusion with old 32bit mount ID */ -#define MNT_UNIQUE_ID_OFFSET (1ULL << 32) +#define MNT_UNIQUE_ID_OFFSET (1ULL << 31) static atomic64_t mnt_id_ctr = ATOMIC64_INIT(MNT_UNIQUE_ID_OFFSET); static struct hlist_head *mount_hashtable __ro_after_init;