projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dcd1332
)
dm vdo memory-alloc: simplify allocations_allowed()
author
Mike Snitzer
<snitzer@kernel.org>
Fri, 9 Feb 2024 20:14:21 +0000
(14:14 -0600)
committer
Mike 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
patch
|
blob
|
blame
|
history
diff --git
a/drivers/md/dm-vdo/memory-alloc.c
b/drivers/md/dm-vdo/memory-alloc.c
index 5cd387f9294e14714deda6a416c54b7a561fe20f..db085c1124bead12ea26bdd7c57c8592a9cd85e9 100644
(file)
--- 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;
}
/*