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/[email protected] Reviewed-by: Josef Bacik <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 51d3798 commit 8eac535

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)