Linux 6.9-rc6
[sfrench/cifs-2.6.git] / lib / stackdepot.c
index af6cc19a200331aa0c37cf2e497384f0b19d8db0..cd8f23455285100036cc4f6971c81017cc0849ad 100644 (file)
@@ -330,7 +330,7 @@ static struct stack_record *depot_pop_free_pool(void **prealloc, size_t size)
        stack = current_pool + pool_offset;
 
        /* Pre-initialize handle once. */
-       stack->handle.pool_index = pool_index + 1;
+       stack->handle.pool_index_plus_1 = pool_index + 1;
        stack->handle.offset = pool_offset >> DEPOT_STACK_ALIGN;
        stack->handle.extra = 0;
        INIT_LIST_HEAD(&stack->hash_list);
@@ -441,7 +441,7 @@ static struct stack_record *depot_fetch_stack(depot_stack_handle_t handle)
        const int pools_num_cached = READ_ONCE(pools_num);
        union handle_parts parts = { .handle = handle };
        void *pool;
-       u32 pool_index = parts.pool_index - 1;
+       u32 pool_index = parts.pool_index_plus_1 - 1;
        size_t offset = parts.offset << DEPOT_STACK_ALIGN;
        struct stack_record *stack;
 
@@ -627,10 +627,10 @@ depot_stack_handle_t stack_depot_save_flags(unsigned long *entries,
                /*
                 * Zero out zone modifiers, as we don't have specific zone
                 * requirements. Keep the flags related to allocation in atomic
-                * contexts and I/O.
+                * contexts, I/O, nolockdep.
                 */
                alloc_flags &= ~GFP_ZONEMASK;
-               alloc_flags &= (GFP_ATOMIC | GFP_KERNEL);
+               alloc_flags &= (GFP_ATOMIC | GFP_KERNEL | __GFP_NOLOCKDEP);
                alloc_flags |= __GFP_NOWARN;
                page = alloc_pages(alloc_flags, DEPOT_POOL_ORDER);
                if (page)