dm vdo memory-alloc: simplify allocations_allowed()
authorMike Snitzer <snitzer@kernel.org>
Fri, 9 Feb 2024 20:14:21 +0000 (14:14 -0600)
committerMike Snitzer <snitzer@kernel.org>
Mon, 4 Mar 2024 20:07:55 +0000 (15:07 -0500)
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
drivers/md/dm-vdo/memory-alloc.c

index 5cd387f9294e14714deda6a416c54b7a561fe20f..db085c1124bead12ea26bdd7c57c8592a9cd85e9 100644 (file)
  */
 static struct thread_registry allocating_threads;
 
-static bool allocations_allowed(void)
+static inline bool allocations_allowed(void)
 {
-       const bool *pointer = vdo_lookup_thread(&allocating_threads);
-
-       return (pointer != NULL) ? *pointer : false;
+       return vdo_lookup_thread(&allocating_threads) != NULL;
 }
 
 /*