summaryrefslogtreecommitdiff
path: root/drivers/md/dm-vdo
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2024-02-09 23:14:21 +0300
committerMike Snitzer <snitzer@kernel.org>2024-03-04 23:07:55 +0300
commit924553644ac5ede5c03311ce218151f2bf7384e7 (patch)
tree5a570989d25fbb47d757886634cd1e4a82623fa9 /drivers/md/dm-vdo
parentdcd1332bb5ff996bc92a63948ba32bceae40507c (diff)
downloadlinux-924553644ac5ede5c03311ce218151f2bf7384e7.tar.xz
dm vdo memory-alloc: simplify allocations_allowed()
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>
Diffstat (limited to 'drivers/md/dm-vdo')
-rw-r--r--drivers/md/dm-vdo/memory-alloc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/md/dm-vdo/memory-alloc.c b/drivers/md/dm-vdo/memory-alloc.c
index 5cd387f9294e..db085c1124be 100644
--- a/drivers/md/dm-vdo/memory-alloc.c
+++ b/drivers/md/dm-vdo/memory-alloc.c
@@ -20,11 +20,9 @@
*/
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;
}
/*