aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@kernel.org>2024-01-26 22:01:26 -0500
committerMike Snitzer <snitzer@kernel.org>2024-02-20 13:43:17 -0500
commitac9ae5769d61e4fe1c5e4245c5cbcd6c0f0f0e9e (patch)
tree0dfb1c6b47643bd408b7e95e741d88c4411660a8 /drivers/md
parent1ccef45aa889a0a3cd3f82681bfd90e0d4c2b203 (diff)
downloadlinux-ac9ae5769d61e4fe1c5e4245c5cbcd6c0f0f0e9e.tar.gz
dm vdo dedupe: fix various small nits
Remove extra blank line, mark function inline, add missing braces, and fix a typo in a comment. Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Chung Chung <cchung@redhat.com> Signed-off-by: Matthew Sakai <msakai@redhat.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-vdo/dedupe.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/md/dm-vdo/dedupe.c b/drivers/md/dm-vdo/dedupe.c
index b3ffb85518c3c7..8533f1669a01be 100644
--- a/drivers/md/dm-vdo/dedupe.c
+++ b/drivers/md/dm-vdo/dedupe.c
@@ -1061,7 +1061,7 @@ static void start_deduping(struct hash_lock *lock, struct data_vio *agent,
* increment_stat() - Increment a statistic counter in a non-atomic yet thread-safe manner.
* @stat: The statistic field to increment.
*/
-static void increment_stat(u64 *stat)
+static inline void increment_stat(u64 *stat)
{
/*
* Must only be mutated on the hash zone thread. Prevents any compiler shenanigans from
@@ -1130,7 +1130,6 @@ static bool blocks_equal(char *block1, char *block2)
{
int i;
-
for (i = 0; i < VDO_BLOCK_SIZE; i += sizeof(u64)) {
if (*((u64 *) &block1[i]) != *((u64 *) &block2[i]))
return false;
@@ -1456,13 +1455,13 @@ static void finish_writing(struct hash_lock *lock, struct data_vio *agent)
lock->duplicate = agent->new_mapped;
lock->verified = true;
- if (vdo_is_state_compressed(lock->duplicate.state) &&
- lock->registered)
+ if (vdo_is_state_compressed(lock->duplicate.state) && lock->registered) {
/*
* Compression means the location we gave in the UDS query is not the location
* we're using to deduplicate.
*/
lock->update_advice = true;
+ }
/* If there are any waiters, we need to start deduping them. */
if (vdo_waitq_has_waiters(&lock->waiters)) {
@@ -2366,7 +2365,7 @@ static void timeout_index_operations_callback(struct vdo_completion *completion)
DEDUPE_CONTEXT_TIMED_OUT)) {
/*
* This context completed between the time the timeout fired, and now. We
- * can treat it as a a successful query, its requestor is already enqueued
+ * can treat it as a successful query, its requestor is already enqueued
* to process it.
*/
continue;