Skip to content

Commit

Permalink
Merge pull request #42 from lorelei-sakai/ingest/simplify-allocations…
Browse files Browse the repository at this point in the history
…-allowed

[VDO-5687] Simplify allocations_allowed()
  • Loading branch information
lorelei-sakai authored Feb 20, 2024
2 parents 9e19f52 + d93909f commit 370b139
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/md/dm-vdo/memory-alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit 370b139

Please sign in to comment.