Skip to contentSkip to conversation

fs/dlm/dir: remove unuse varible count_match

RFC PATCH In review [email protected] 2 participants 2 messages Jan 7 Distributed lock manager (DLM)

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 fs/dlm/dir: remove unuse varible count_match

From: Alex Shi <[email protected]>

The variable was never used after introduced. Better to comment it if we want to keep the info.

fs/dlm/dir.c:65:26: error: variable 'count_match' set but not used [-Werror,-Wunused-but-set-variable]
65 | unsigned int count = 0, count_match = 0, count_bad = 0, count_add = 0;
| ^
1 error generated.

Cc Alexander Aring <[email protected]>
Cc David Teigland <[email protected]>
---
 fs/dlm/dir.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/dlm/dir.c +3 -3
index b1ab0adbd9d0..01c292379f5b 100644
@@ -62,7 +62,7 @@ int dlm_recover_directory(struct dlm_ls *ls, uint64_t seq)
 	char *b, *last_name = NULL;
 	int error = -ENOMEM, last_len, nodeid, result;
 	uint16_t namelen;
-	unsigned int count = 0, count_match = 0, count_bad = 0, count_add = 0;
+	unsigned int count = 0, count_bad = 0, count_add = 0;
 
 	log_rinfo(ls, "dlm_recover_directory");
 
@@ -157,12 +157,12 @@ int dlm_recover_directory(struct dlm_ls *ls, uint64_t seq)
 				}
 
 				/* The name was found in rsbtbl, and the
-				 * master nodeid matches memb->nodeid. */
+				 * master nodeid matches memb->nodeid.
 
 				if (result == DLM_LU_MATCH &&
 				    nodeid == memb->nodeid) {
 					count_match++;
-				}
+				}*/
 
 				/* The name was not found in rsbtbl and was
 				 * added with memb->nodeid as the master. */
Signature · 1 line
2.43.0
maintainer Acked-by on v1 1/1
#1 lore raw

Hi,

Quoted 11 lines · On Wed, Jan 7, 2026 at 2:36 AM <[email protected]> wrote:

From: Alex Shi <[email protected]>

The variable was never used after introduced. Better to comment it if we want to keep the info.

fs/dlm/dir.c:65:26: error: variable 'count_match' set but not used [-Werror,-Wunused-but-set-variable]
65 | unsigned int count = 0, count_match = 0, count_bad = 0, count_add = 0;
| ^
1 error generated.

Quoted 4 lines
Cc Alexander Aring <[email protected]>
Cc David Teigland <[email protected]>

- Alex