Skip to content

Commit 8eac535

Browse files
committed
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 <josef@toxicpanda.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
1 parent 51d3798 commit 8eac535

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/namespace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static DEFINE_IDA(mnt_id_ida);
7070
static DEFINE_IDA(mnt_group_ida);
7171

7272
/* Don't allow confusion with old 32bit mount ID */
73-
#define MNT_UNIQUE_ID_OFFSET (1ULL << 32)
73+
#define MNT_UNIQUE_ID_OFFSET (1ULL << 31)
7474
static atomic64_t mnt_id_ctr = ATOMIC64_INIT(MNT_UNIQUE_ID_OFFSET);
7575

7676
static struct hlist_head *mount_hashtable __ro_after_init;

0 commit comments

Comments
 (0)